Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-3
-
Fix Version/s: 1.0-beta-3
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Environment:Windows 2000, Sun JDK 1.4.2
-
Number of attachments :
Description
Let's say that I configure DefaultLifecyclePicoContainer like this:
final DefaultLifecyclePicoContainer container =
new DefaultLifecyclePicoContainer();
container.registerComponentImplementation(
JMS_SERVICE,
JMSService.class,
new Parameter[]
);
container.start();
Here is my JMSService class:
public class JMSService implements Lifecycle {
public static final String DEFAULT_SERVER_ID = "0";
public static final String DEFAULT_PATH = "jms";
private String serverId;
private String path;
public JMSService(String serverId, String path) {
this.serverId = (serverId == null) ? DEFAULT_SERVER_ID : path;
this.path = (path == null) ? DEFAULT_PATH : path;
try {
AgentServer.init(new String[]
);
} catch (Exception e)
}
public void start() {
try { AgentServer.start(); } catch (Exception e) { // Do something }
}
public void stop()
{ AgentServer.stop(); } public void dispose() {
}
Everything seems ok, but it fails:
org.picocontainer.defaults.NoSatisfiableConstructorsException: com.mass1.proxyserver.services.JMSService doesn't have any satisfiable constructors. Unsatisfiable dependencies: [class java.lang.String]
at org.picocontainer.defaults.DefaultComponentAdapter.getSatisfiableConstructors(DefaultComponentAdapter.java:126)
at org.picocontainer.defaults.DefaultComponentAdapter.getConstructor(DefaultComponentAdapter.java:67)
at org.picocontainer.defaults.DefaultComponentAdapter.getDependencies(DefaultComponentAdapter.java:57)
at org.picocontainer.defaults.DefaultComponentAdapter.getComponentInstance(DefaultComponentAdapter.java:136)
at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:163)
at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstances(DefaultPicoContainer.java:150)
at org.picocontainer.defaults.DefaultPicoContainer.getComponentMulticaster(DefaultPicoContainer.java:117)
at org.picocontainer.extras.DefaultLifecyclePicoAdapter.initializeIfNotInitialized(DefaultLifecyclePicoAdapter.java:60)
at org.picocontainer.extras.DefaultLifecyclePicoAdapter.start(DefaultLifecyclePicoAdapter.java:82)
at org.picocontainer.extras.DefaultLifecyclePicoContainer.start(DefaultLifecyclePicoContainer.java:39)
at com.mass1.proxyserver.ProxyServer.main(ProxyServer.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
Activity
Field | Original Value | New Value |
---|---|---|
Resolution | Cannot Reproduce [ 5 ] | |
Status | Unassigned [ 1 ] | Closed [ 6 ] |
Fix Version/s | 1.0 [ 10145 ] |
Resolution | Cannot Reproduce [ 5 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Fix Version/s | 1.0 [ 10145 ] | |
Fix Version/s | 1.0-beta-3 [ 10232 ] |
Status | Reopened [ 4 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
See testPico52() in org.picocontainer.tck.AbstractPicoContainerTestCase
Feel free to reopen if this is incorrect.