[JCA/JBoss] - Re: Problem in data source binding while server start
by sunil@jboss.org
Hi Vicky,
Thnx for the reply.
I am changing the deployment order in org.jboss.deployment.MainDeployer-xmbean.xml for -ds.xml and .jar files as below:
Allows the override of the suffix order declared by subdeployers, using the syntax [order:]suffix
EnhancedSuffixOrder
[Ljava.lang.String;
<!--
Statically set one or more enhanced suffix orders, independent of the value proposed by subdeployers.
Some deployers may also allow the suffixes/orders to be set locally, so that's preferable too.
For reference, this is the list of enhanced suffixes likely to be set by deployers (it may not
be completely up-to-date, or there can be user-defined deployers).
050:.deployer,050:-deployer.xml,100:.aop,100:-aop.xml,150:.sar,150:-service.xml,200:.beans,250:.rar,300:-ds.xml,350:.har,400:.jar,400:.ejb3,400:.par,500:.war,600:.wsr,650:.ear,700:.jar,750:.zip,800:.bsh,900:.last
Until we resolve some startup issues, we'll setup some static enhanced suffix orders bellow
and leave the rest of the suffixes contributed dynamically by registering deployers.
-->
Please let me know if the above configuration is ok.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211387#4211387
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211387
17 years, 2 months
[EJB 3.0] - Access Session Bean from a Servlet in external WAR
by formica
Dear experts, I have an EAR containing some jar files (one with interfaces and POJOs, one with Session Beans, ...), which is correctly deployed and
working in JBoss 5, and I'm trying to access some of the Session Beans methods from a separate WAR , which contains GWT based application.
I did a test using the WAR deployed in hosted mode (with the tomcat delivered by GWT) , and I managed (putting the needed jar with the
interfaces + the jboss client jars in the CLASSPATH) to access the session beans from the REMOTE interface.
Now I'm trying to test the same but deploying the war inside JBoss 5, and I'm having lots of problems related to (I think) classloading issues.
I read several posts on the forum, but I did not manage to succeed, while a similar application was working in Jboss 4.2.2.
Just to summarize what I have in the WAR :
there is a WEB-INF/lib containing only gwt-servlet.jar
there is a WEB-INF/web.xml containing servlet definitions
there is a WEB-INF/classes containing all the code
there is the stuff generated by GWT...
I also have a jndi.properties at the root level of the WAR, containing some
parameters for jndi :
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.provider.url=jnp://dapmcf121:1099
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| client.method=local
| web.host.url=http://dapmcf121:8080
|
and here is where I try to retrieve the interface :
| if (clientmethod.equals("local")) {
| log.info("Getting local stub using jndi");
| InitialContext ctx = new InitialContext();
| tagDAO = (AligntagBD) ctx.lookup(SERVER_NAME
| + "/AligntagBDBean/local");
| }
|
(in case it helps...)
I did try to set in file deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml the parameter useJBossWebLoader=true
but nothing changed in the error message which is the following:
|
| 11:05:45,757 ERROR [STDERR] java.lang.Exception: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@2db555]
| 11:05:45,758 ERROR [STDERR] at align.gwt.monitor.server.impl.AlignMonitoringSvcImpl.initTagDAO(AlignMonitoringSvcImpl.java:137)
| 11:05:45,758 ERROR [STDERR] at align.gwt.monitor.server.impl.AlignMonitoringSvcImpl.getTags(AlignMonitoringSvcImpl.java:203)
| 11:05:45,758 ERROR [STDERR] at align.gwt.monitor.server.impl.AlignMonitoringSvcImpl.getTags(AlignMonitoringSvcImpl.java:326)
| 11:05:45,758 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 11:05:45,758 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 11:05:45,758 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 11:05:45,758 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 11:05:45,758 ERROR [STDERR] at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
| 11:05:45,758 ERROR [STDERR] at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
| 11:05:45,758 ERROR [STDERR] at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
| 11:05:45,758 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| 11:05:45,758 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 11:05:45,758 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 11:05:45,758 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 11:05:45,758 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 11:05:45,758 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 11:05:45,758 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 11:05:45,758 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| 11:05:45,759 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| 11:05:45,759 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| 11:05:45,759 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| 11:05:45,759 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| 11:05:45,759 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| 11:05:45,759 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| 11:05:45,759 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| 11:05:45,759 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| 11:05:45,759 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| 11:05:45,759 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| 11:05:45,759 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| 11:05:45,759 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| 11:05:45,759 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| 11:05:45,759 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
| 11:05:45,759 ERROR [STDERR] Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@2db555]
| 11:05:45,759 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1463)
| 11:05:45,759 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
| 11:05:45,759 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
| 11:05:45,759 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
| 11:05:45,760 ERROR [STDERR] at align.gwt.monitor.server.impl.AlignMonitoringSvcImpl.initTagDAO(AlignMonitoringSvcImpl.java:125)
| 11:05:45,760 ERROR [STDERR] ... 31 more
| 11:05:45,760 ERROR [STDERR] Caused by: java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@2db555
| 11:05:45,760 ERROR [STDERR] at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:341)
| 11:05:45,760 ERROR [STDERR] at org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
| 11:05:45,760 ERROR [STDERR] at org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
| 11:05:45,761 ERROR [STDERR] at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:156)
| 11:05:45,761 ERROR [STDERR] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| 11:05:45,761 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1438)
| 11:05:45,761 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1455)
| 11:05:45,761 ERROR [STDERR] ... 35 more
| 11:05:45,761 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: asap.server.io.dao.AligntagBDLocal
| 11:05:45,761 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| 11:05:45,761 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
| 11:05:45,761 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| 11:05:45,761 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
| 11:05:45,761 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| 11:05:45,761 ERROR [STDERR] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
| 11:05:45,761 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
| 11:05:45,761 ERROR [STDERR] at java.lang.Class.forName(Class.java:242)
| 11:05:45,761 ERROR [STDERR] at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:337)
| 11:05:45,761 ERROR [STDERR] ... 41 more
| 11:05:45,762 ERROR [[/AlignGWTConsole]] Exception while dispatching incoming RPC call
| com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult align.gwt.monitor.client.services.AlignMonitoringSvc.getTags(java.lang.String,com.extjs.gxt.ui.client.data.PagingLoadConfig)' threw an unexpected exception: java.lang.NullPointerException
| at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
| at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
| at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
| at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:613)
| Caused by: java.lang.NullPointerException
| at align.gwt.monitor.server.impl.AlignMonitoringSvcImpl.getTags(AlignMonitoringSvcImpl.java:354)
| 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:585)
| at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
| ... 24 more
|
|
|
Please tell me if you have any hints to debug this, I'm not an expert in classloading and I'm a little bit lost...
Andrea
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211386#4211386
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211386
17 years, 2 months
[JCA/JBoss] - Problem in data source binding while server start
by sunil@jboss.org
Hi All,
I am facing a problem in jboss deployment order while starting server. I am trying to deploy a .jar file which connects to mssql data source. While deploying I am getting the below exception:
14:36:48,795 ERROR [Alerter] Exception occurred in com.soa.alerter.Alerter : MSSQLDSA not bound
javax.naming.NameNotFoundException: MSSQLDSA not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
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:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.nyco.soa.alerter.Alerter.getConnection(Unknown Source)
at com.nyco.soa.alerter.Alerter.getQueueList(Unknown Source)
at com.nyco.soa.alerter.Alerter.execute(Unknown Source)
at com.nyco.soa.alerter.Alerter.perform(Unknown Source)
at org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1251)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java
:153)
at $Proxy11.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcaste
rSupport.java:221)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterS
upport.java:184)
at javax.management.timer.Timer.sendNotification(Timer.java:1295)
at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1264)
at javax.management.timer.TimerAlarmClock.run(Timer.java:1347)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
I have configured two data sources in mssql-ds.xml which point to the same database. Following is the data source configuration:
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:sqlserver://102.602.19.163:1433;DatabaseName=myDB</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
sa
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<type-mapping>MS SQLSERVER2000</type-mapping>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>MSSQLDSA</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:sqlserver://102.602.19.163:1433;DatabaseName=myDB</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
sa
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<type-mapping>MS SQLSERVER2000</type-mapping>
</local-tx-datasource>
Thanks in Advance for the help :)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211369#4211369
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211369
17 years, 2 months