users@glassfish.java.net

Re: RE: SEVERE: Exception while invoking class

From: <forums_at_java.net>
Date: Mon, 18 Apr 2011 23:46:55 -0500 (CDT)

Hi Narayanaa,   I seem to have overcome the library loading after having
adding
C:\glassfish3\glassfish\domains\domain1\lib\mysql-connector-java-5.1.6-bin.jar
even though the two are not related. However, the following deployment error
remains after carrying out dependency-lookup of @UserResource in application
client:   *com.sun.enterprise.container.common.spi.util.InjectionException:
Exception attempting to inject Env-Prop:
**client.applicationClient/tx_at_Field-Injectable* [1]* Resource. Class name =
client.applicationClient Field
name=tx_at_java.lang.String_at_java:comp/UserTransaction@@ into class
client.applicationClient* *        at
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:698)*
*        at
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:468)*
*        at
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:215)*
*        at
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:207)*
*        at
org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:619)*
*        at
org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:511)*
*        at
org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:405)*
*        at
org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:319)*
*        at
org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:278)*
*        at
org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:76)*
*        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:597)*
*        at
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)*
*        at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)*
*Caused by: com.sun.enterprise.container.common.spi.util.InjectionException:
Injected field javax.transaction.UserTransaction client.applicationClient.tx
on Application Client class class client.applicationClient must be declared
static* *        at
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:624)*
  Below is the code snippet of client.applicationClient:   import
javax.transaction.UserTransaction;   public class applicationClient {  
    @Resource UserTransaction tx;       ……..       try {  
          tx.begin();         …….     } finally {
          try {                  tx.commit();
          }     } }   Please let me know if I should post this
question to another Online Active Forum instead.   Thanks again,   Crystal
   

[1] mailto:client.applicationClient/tx_at_Field-Injectable

--
[Message sent by forum member 'crytal123']
View Post: http://forums.java.net/node/792879