You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jürgen Weber (JIRA)" <ji...@apache.org> on 2008/10/28 11:02:44 UTC

[jira] Created: (GERONIMO-4381) Better error message for trying to inject String arrays

Better error message for trying to inject String arrays
-------------------------------------------------------

                 Key: GERONIMO-4381
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: dependencies
            Reporter: Jürgen Weber
            Priority: Minor


I erroneously tried to inject a String array

@Resource
	private String[] ...

There should be a better error message for this than

could not load class [Ljava.lang.String;
org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jürgen Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644612#action_12644612 ] 

Jürgen Weber commented on GERONIMO-4381:
----------------------------------------

I have 2.1.3

I took the sample from http://cwiki.apache.org/GMOxDOC21/calculator-using-ejb-30-functions.html

and added 

	@Resource
	String[] hello;

to Calculator.java

The error comes with or without ejb-jar.xml.
I'll append ear + src

> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>         Attachments: calculator.ear
>
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Gawor resolved GERONIMO-4381.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Jarek Gawor

I'm still unable to reproduce this problem. I deployed the attached ear (using deploy.sh tool and the admin console) on 2.1.3 and all I see is:

    Error: Unable to distribute calculator.ear: Unable to resolve  resource reference  'org.apache.geronimo.samples.slsb.calculator.Calculator/hello'
    (Could not auto-map to resource.  Try adding a resource-ref mapping to your Geronimo deployment plan.
     ....

I'm resolving this issue for now but please reopen it if you can provide a new ear file that produces this problem or describe the exact steps to recreate this problem.


> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Assignee: Jarek Gawor
>            Priority: Minor
>         Attachments: calculator.ear, src.zip
>
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jürgen Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jürgen Weber updated GERONIMO-4381:
-----------------------------------

    Attachment: src.zip

> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>         Attachments: calculator.ear, src.zip
>
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jürgen Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jürgen Weber updated GERONIMO-4381:
-----------------------------------

    Attachment: calculator.ear

> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>         Attachments: calculator.ear
>
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643216#action_12643216 ] 

Jarek Gawor commented on GERONIMO-4381:
---------------------------------------

Can you please (and always) attach full stack trace? It will help to track down the problem much faster.


> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jürgen Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643239#action_12643239 ] 

Jürgen Weber commented on GERONIMO-4381:
----------------------------------------

Sorry, thought, it's easy to reproduce. But anyway:

could not load class [Ljava.lang.String;
org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;
	at org.apache.geronimo.connector.deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:137)
	at org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
	at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:321)
	at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:286)
	at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:764)
	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
	at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
	at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
	at org.apache.geronimo.deployment.plugin.local.RedeployCommand.redeployUpdatedConfiguration(RedeployCommand.java:137)
	at org.apache.geronimo.deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:106)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String; in classloader default/CommandEar/1225209995541/car
	at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:437)
	at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:279)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.apache.geronimo.connector.deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:135)
	... 18 more


> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4381) Better error message for trying to inject String arrays

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644211#action_12644211 ] 

Jarek Gawor commented on GERONIMO-4381:
---------------------------------------

What Geronimo version are you using? Did you add a resource-ref-entry in the DD for this resource? If so, can you paste/attach it? I'm unable to reproduce this problem unless the resource-ref-entry entry is added (with a wrong class name) to the DD by hand.


> Better error message for trying to inject String arrays
> -------------------------------------------------------
>
>                 Key: GERONIMO-4381
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4381
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: dependencies
>            Reporter: Jürgen Weber
>            Priority: Minor
>
> I erroneously tried to inject a String array
> @Resource
> 	private String[] ...
> There should be a better error message for this than
> could not load class [Ljava.lang.String;
> org.apache.geronimo.common.DeploymentException: could not load class [Ljava.lang.String;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.