Parsing XML from a session bean
Hi,
I am trying to use a Sax parser for parsing xml received from a back end
legacy system. The code is executed from a Session bean.
Debugging learned me that the parse() method on the parser hangs the
container without any error or exception trace. The code works fine outside
a container.
All help will be highly appreciated.
Kurt
I found out that the InputStream implementation used parsing source inside
the container is different
then from the one outside (other type of VM of course!). The Weblogic
implementation blocks at the end of
the stream, while the normal SUN JDK 1.3 returns. This is not a bug, the bug
I found is in my proxy that allows
the connection to the backend. This proxy allows HTTP connections, and I
parse the XML received over HTTP.
Regards,
Kurt
"Todd Karakashian" <[email protected]> wrote in message
news:[email protected]..
That's seems odd. Perhaps there is something going on in your document
handler code that triggers a hang in the environment of the server.
When you see the hang, instruct the VM to give you a thread dump (type
control-<break> on Windows, <control>-\ (backslash) on UNIX in the
window in which the server is running; the results are dumped to
stderr). That will show what every thread in the server is doing. If you
email or post the thread dump, I will take a look at it and see if I can
see what is going on. Also, let us know which platform, VM, parser, and
WebLogic version you are using.
Regards,
-Todd
Kurt Quirijnen wrote:
Hi,
I am trying to use a Sax parser for parsing xml received from a back end
legacy system. The code is executed from a Session bean.
Debugging learned me that the parse() method on the parser hangs the
container without any error or exception trace. The code works fine
outside
a container.
All help will be highly appreciated.
Kurt--
Todd Karakashian
BEA Systems, Inc.
[email protected]
Similar Messages
-
How to get access via RMI from a session bean to a remote session bean?
I have 2 J2EE applications in two different Sun Application Servers (8.0 PE). I would like to get access from one Session Bean "SB1" into Application A to Session Bean "BrickFacade" within Application B.
My Java Code from "SB1":
Context ic = new InitialContext();
Object o = ic.lookup("java:comp/env/ejb/BrickFacade");
BrickFacadeHome brickFacadeHome2 = (BrickFacadeHome) PortableRemoteObject.narrow(o, BrickFacadeHome.class);
brickFacade = brickFacadeHome2.create();
Collection col = brickFacade.doSomething();
...I configured the remote App.server in sun-ejb-jar.xml. I found the syntax within documentation (http://docs.sun.com/source/817-6087/dgjndi.html#wp24622) but I'm not sure if I this is the right usage.
<ejb-ref>
<ejb-ref-name>ejb/BrickFacade</ejb-ref-name>
<jndi-name>corbaname:iiop://161.90.176.213:3700#webclient/BrickFacade</jndi-name>
</ejb-ref>The context lookup throws the exception:
"IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
and
Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700
javax.naming.ConfigurationException: Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700 [Root exception is org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No]
Could anyone help me? Many thanks!
Stacktrace:
"IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
at com.sun.corba.ee.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:103)
at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:774)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:338)
at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:702)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:108)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.getBrickFacade(TestRemoteEjbBean.java:108)
at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.startTest(TestRemoteEjbBean.java:79)
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)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy7.startTest(Unknown Source)
at de.emilberlinerstudios.va.ejb.testrh.sb._TestRemoteEjb_Stub.startTest(Unknown Source)
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)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
at org.apache.jsp.dispatch_jsp._jspService(dispatch_jsp.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
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)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
at java.lang.Thread.run(Thread.java:534)
|#]
[#|2006-10-02T13:52:55.390+0200|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=11;|2006-10-02 13:52:55 [8080-Processor4] INFO .va.ejb.testrh.sb.TestRemoteEjbBean - RemoteException when getting BrickFacade. Message:Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700
javax.naming.ConfigurationException: Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700 [Root exception is org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:367)
at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:702)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:108)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.getBrickFacade(TestRemoteEjbBean.java:108)
at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.startTest(TestRemoteEjbBean.java:79)
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)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy7.startTest(Unknown Source)
at de.emilberlinerstudios.va.ejb.testrh.sb._TestRemoteEjb_Stub.startTest(Unknown Source)
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)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
at org.apache.jsp.dispatch_jsp._jspService(dispatch_jsp.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
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)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
at com.sun.corba.ee.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:103)
at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:774)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.j|#]Problem solved:
configuration in jndi-name was wrong:
<jndi-name>corbaname:iiop:161.90.176.213:3700#ejb/BrickFacade</jndi-name> -
Do JNDI look up for entity beans from a session bean in different jars
I have a problem doing entity beans JNDI look up from a session bean which is deployed
as a separate package (session.jar) from the entity beans (entity.jar)
I believe if both session bean and entity beans are deployed into one jar and
I specify ejb-local-reference-description for session bean, it should work. However,
due to some reason, they have to be in separated packages but still in the same
container. Then question how to do JNDI lookup given entity beans only have local
interfaces?
FYI.
1 both session.jar and entity.jar are self-contained. i.e., no deployment error.
each JNDI name can be viewed from JNDI tree
2. weblogic-ejb-jar.xml for session.jar
<weblogic-ejb-jar>
<description><![CDATA[Generated by XDoclet]]></description>
<weblogic-enterprise-bean>
<ejb-name>PetstoreLogic</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>PetstoreLogic</jndi-name>
<local-jndi-name>PetstoreLogicLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
3. weblogic-ejb-jar.xml (code snip) for entity.jar
<weblogic-enterprise-bean>
<ejb-name>Account</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
</reference-descriptor>
<local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
4. if I do
accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
get error like:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)In weblogic-ejb-jar.xml use jndi-name instead of local-jndi-name in reference-descriptor
element.
"Qiming He" <[email protected]> wrote:
>
I have a problem doing entity beans JNDI look up from a session bean
which is deployed
as a separate package (session.jar) from the entity beans (entity.jar)
I believe if both session bean and entity beans are deployed into one
jar and
I specify ejb-local-reference-description for session bean, it should
work. However,
due to some reason, they have to be in separated packages but still in
the same
container. Then question how to do JNDI lookup given entity beans only
have local
interfaces?
FYI.
1 both session.jar and entity.jar are self-contained. i.e., no deployment
error.
each JNDI name can be viewed from JNDI tree
2. weblogic-ejb-jar.xml for session.jar
<weblogic-ejb-jar>
<description><![CDATA[Generated by XDoclet]]></description>
<weblogic-enterprise-bean>
<ejb-name>PetstoreLogic</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>PetstoreLogic</jndi-name>
<local-jndi-name>PetstoreLogicLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
3. weblogic-ejb-jar.xml (code snip) for entity.jar
<weblogic-enterprise-bean>
<ejb-name>Account</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
</reference-descriptor>
<local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
4. if I do
accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
get error like:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338) -
Error while calling a Web Service from a Session Bean
I am trying to call a Web Service from a Session Bean using an Axis client, but I am getting the next exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org/apache/axis/client/Service
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
at javax.rmi.CORBA.Util.wrapException(Util.java:277)
at com.ing.mx.seguros.siniestros.litigios.ejb._SisaServiceRemote_Stub.invocarWebSericeProveedorLegal(Unknown Source)
at com.ing.mx.seguros.siniestros.litigios.proxy.SisaWsProxy.solicitarApoyoLegal(SisaWsProxy.java:132)
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)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)Thanks for any help provided.
Does any one have insights about it?Hi Swapna,
from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
Maybe it could help.
Regards,
Dawood. -
Problems accessing fields in a CMP entity bean from a session bean
Hello everybody,
I'm getting the next problem: when I try to access a field in a CMP entity bean that I have instantiated from a session bean (trhoug entitybean.getNameOfField), I get the error "the entity bean does not exist in the database".
This entity bean is accessing a table in an external database (not the DB of the WAS), but I know that it's getting the correct data from the table, since I check the entitybean.size() and the entitybean.findByPrimaryKey(), and I get the right information. For some reason, the only thing that it doesn't work in the entity bean are the getter/setter methods (I created them automatically after having created the entity fields).
I access the entity bean through its local interface...
I know it's really difficult to give an answer with so few details, but... does anybody think I forgot something important to configure??
Thank very much in advance!!
Isidrogetter and setter methods for cmp-fields are abstract.
getter and setter methods for cmr-fields are abstract.
"John Lee" <[email protected]> wrote:
>
Hi:
Which method in a CMP Entity bean should be abstract? just only SetXXX
and
GetXXX?
Thanks!
John Lee -
Can't parse xml from applet using dom on linux on Netscape 7 using jre 1.4.
Hi,
I can't seem to parse xml from an applet on linux on Netscape 7 using the JRE 1.4.
My code looks like the following:
StringBufferInputStream is = new StringBufferInputStream("<foo></foo>");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = null;
try
builder = factory.newDocumentBuilder();
domDocument = builder.parse(is); // this line creates an exception
catch (Exception e)
System.out.println(e);
This code works fine from an applet on windows. On linux, the error message is:
java.security.AccessControlException: access denied (java.util.PropertyPermission entityExpansionLimit read)
I've tried both JRE 1.4.0_04 and 1.4.1_03
Thanks!
QThere's another posting about this same problem (platform unspecified), but the same error message. I was also having this problem (Windows 1.4.03) and swithced back to 1.4.01 and the problem went away. In the future, I may sign my applets to get a more generous security policy. But, I'm sure it'll be a lot of work (vs. a line of code somewhere).
-
Web Service from stateful Session Bean deleted after server restart
Hi,
i created a stateful session bean and from this a web service.
I am able to deploy it and it works really fine.
My problem is: after a server restart the web service is gone and i
have to deploy it again.
I have some other web services (but these are web services from stateless session beans)
but they "survive" the server restart.
I don't want to deploy the web service after every server restart, did I forget something or
is it a general problem of stateful session beans or web services?
Thanks in advance
JensHello Björn,
I am not quite sure what your problem is but did you have a look at these articles:
http://help.sap.com/saphelp_nw04/helpdata/en/4d/993441c73cef23e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/be/2e2c4142aef623e10000000a155106/frameset.htm
I hope they can give you some idea.
Regads
Vyara -
Parsing XML from Socket input stream
I create a sax parser to which I send the InputStream from the socket
But my HandlerBase never gets the events. I get startDocument
but that is it, I never get any other event.
The code I have works just like expected when I make the InputStream
come from a file. The only differeence I see is that when I file is used the
InputStream is fully consumed while with the socket the InputStream
is kept open (I MUST KEEP THE SOCKET OPEN ALL THE TIME). If the parser
does not generate the events unless the InputStream is fully consumed,
isn't that against the whole idea of SAX (sax event driven) .
Has anyone been succesfull parsing XML from the InputStream of a socket?
if yes how?
I am using JAXP 1.0.1 but I can upgrade to JAXP 1.1.0
which uses SAX 2.0
Does anybody know if my needs can be met by JAXP 1.1.0?
ThanksI did the same with client/server model.
I have client program with SAX parser. Please try if you can make the server side. I was be able to write the program with help from this forum. Please search to see if you can get the forum from which I got help for this program.
// JAXP packages
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
// JAVA packages
import java.util.*;
import java.io.*;
import java.net.*;
public class XMLSocketClient {
final private static int buffSize = 1024*10;
final private static int PORTNUM = 8888;
final private static int threadSleepValue = 1000;
private static void usage() {
System.err.println("Usage: XMLSocketClient [-v] serverAddr");
System.err.println(" -v = validation");
System.exit(1);
public static void main(String[] args) {
String address = null;
boolean validation = false;
Socket socket = null;
InputStreamReader isr_socket = null;
BufferedReader br_socket = null;
CharArrayReader car = null;
BufferedReader br_car = null;
char[] charBuff = new char[buffSize];
int in_buff = 0;
* Parse arguments of command options
for (int i = 0; i < args.length; i++) {
if (args.equals("-v")) {
validation = true;
} else {
address = args[i];
// Must be last arg
if (i != args.length - 1) {
usage();
// Initialize the socket and streams
try {
socket = new Socket(address, PORTNUM);
isr_socket = new InputStreamReader(socket.getInputStream());
br_socket = new BufferedReader(isr_socket, buffSize);
catch (IOException e) {
System.err.println("Exception: couldn't create stream socket "
+ e.getMessage());
System.exit(1);
* Check whether the buffer has input.
try {
while (br_socket.ready() != true) {
try {
Thread.currentThread().sleep(threadSleepValue);
catch (InterruptedException ie) {
System.err.println("Interrupted error for sleep: "+ ie.getMessage());
System.exit(1);
catch (IOException e) {
System.err.println("I/O error for in.read(): "+ e.getMessage());
System.exit(1);
try {
in_buff = br_socket.read(charBuff, 0, buffSize);
System.out.println("in_buff = " + in_buff);
System.out.println("charBuff length: " + charBuff.length);
if (in_buff != -1) {
System.out.println("End of file");
} catch (IOException e) {
System.out.println("Exception: " + e.getMessage());
System.exit(1);
System.out.println("reading XML file:");
StringBuffer display = new StringBuffer();
display.append(charBuff, 0, in_buff);
System.out.println(display.toString());
* Create BufferedReader from the charBuff
* in order to put into XML parser.
car = new CharArrayReader(charBuff, 0, in_buff); // these two lines have to be here.
br_car = new BufferedReader(car);
* Create a JAXP SAXParserFactory and configure it
* This section is standard handling of XML document by SAX XML parser.
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating(validation);
XMLReader xmlReader = null;
try {
// Create a JAXP SAXParser
SAXParser saxParser = spf.newSAXParser();
// Get the encapsulated SAX XMLReader
xmlReader = saxParser.getXMLReader();
} catch (Exception ex) {
System.err.println(ex);
System.exit(1);
// Set the ContentHandler of the XMLReader
xmlReader.setContentHandler(new MyXMLHandler());
// Set an ErrorHandler before parsing
xmlReader.setErrorHandler(new MyErrorHandler(System.err));
try {
* Tell the XMLReader to parse the XML document
xmlReader.parse(new InputSource(br_car));
} catch (SAXException se) {
System.err.println(se.getMessage());
System.exit(1);
} catch (IOException ioe) {
System.err.println(ioe);
System.exit(1);
* Clearance of i/o functions after parsing.
try {
br_socket.close();
} catch (IOException e) {
System.out.println("Exception: " + e.getMessage());
try {
socket.close();
} catch (IOException e) {
System.out.println("Exception: " + e.getMessage());
try {
br_car.close();
} catch (IOException e) {
System.out.println("Exception: " + e.getMessage());
* The XML handler used by this program
class MyXMLHandler extends DefaultHandler {
// A Hashtable with tag names as keys and Integers as values
private Hashtable tags;
// Parser calls this once at the beginning of a document
public void startDocument() throws SAXException {
System.out.println("startDocument()");
tags = new Hashtable();
// Parser calls this for each element in a document
public void startElement(String namespaceURI, String localName,
String rawName, Attributes atts)
throws SAXException
String key = localName;
Object value = tags.get(key);
System.out.println("startElement()");
System.out.println("namespaceURI: " + namespaceURI);
System.out.println("localName: " + localName);
System.out.println("rawName: " + rawName);
if (value == null) {
// Add a new entry
tags.put(key, new Integer(1));
} else {
// Get the current count and increment it
int count = ((Integer)value).intValue();
count++;
tags.put(key, new Integer(count));
// Parser calls this once after parsing a document
public void endDocument() throws SAXException {
Enumeration e = tags.keys();
System.out.println("endDocument()");
while (e.hasMoreElements()) {
String tag = (String)e.nextElement();
int count = ((Integer)tags.get(tag)).intValue();
System.out.println("Tag <" + tag + "> occurs " + count
+ " times");
* Error handler of XML parser to report errors and warnings
* This is standard handling.
class MyErrorHandler implements ErrorHandler {
/** Error handler output goes here */
private PrintStream out;
MyErrorHandler(PrintStream out) {
this.out = out;
* Returns a string describing parse exception details
private String getParseExceptionInfo(SAXParseException spe) {
String systemId = spe.getSystemId();
if (systemId == null) {
systemId = "null";
String info = "URI=" + systemId +
" Line=" + spe.getLineNumber() +
": " + spe.getMessage();
return info;
* The following methods are standard SAX ErrorHandler methods.
* See SAX documentation for more info.
public void warning(SAXParseException spe) throws SAXException {
out.println("Warning: " + getParseExceptionInfo(spe));
public void error(SAXParseException spe) throws SAXException {
String message = "Error: " + getParseExceptionInfo(spe);
throw new SAXException(message);
public void fatalError(SAXParseException spe) throws SAXException {
String message = "Fatal Error: " + getParseExceptionInfo(spe);
throw new SAXException(message); -
Calling an RPG (AS400) program from a Session Bean
Hi, does anyone know if there is a kind of connector that makes possbile to call an RPG program in an AS400 host from a session bean, allowing the application server (i.e. : JBoss or WAS or WLB) to maintain the transaction ?
Thanks,
Klaus Koenig
ItalyYes, it is called "AS/400 Toolbox for Java".
-
Error when returning Vector from EJB Session Bean
I am testing the EJB functionality within JDeveloper(9.0.3). I simply expanded on the tutorial that is in the documentation (departments and employees). I created a method in the stateless session bean that retrieves a Collection of employees for a department, then converts it to a Vector. When I try to return the Vector from the session bean to a sample client, I get an error indicating that the Object is NOT serializable. I know that Vector IS serializable. Why do I get this error? (The error displays on the client message log, NOT the OC4J message log). I tried dumping the Vector to System.out.println - this works fine, so I l know I'm getting data.
Here is the stack trace and errors that display:
com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object: EmployeeLocal_EntityBeanWrapper4
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:404
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:377
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:419
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:599
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:357
java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
hrApp_StatelessSessionBeanWrapper2.java:323
java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
native code
void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
RMICallHandler.java:119
void com.evermind.server.rmi.RMICallHandler.run()
RMICallHandler.java:48
void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
PooledExecutor.java:803
void java.lang.Thread.run()
Thread.java:484
at connection to localhost/127.0.0.1 as admin
void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
RMIConnection.java:1558
java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
RMIConnection.java:1511
java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
RemoteInvocationHandler.java:53
java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
RecoverableRemoteInvocationHandler.java:22
java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
StatelessSessionRemoteInvocationHandler.java:50
java.util.Collection __Proxy1.getEmployeesByDepartment(java.lang.Long)
javax.swing.table.DefaultTableModel hr.hrAppClientFrame.getTableModel()
hrAppClientFrame.java:150
void hr.hrAppClientFrame.jbInit()
hrAppClientFrame.java:122
void hr.hrAppClientFrame.<init>()
hrAppClientFrame.java:58
void hr.hrAppClientFrame.main(java.lang.String[])
hrAppClientFrame.java:141
Nested exception is:
java.io.NotSerializableException: EmployeeLocal_EntityBeanWrapper4
void java.io.ObjectOutputStream.outputObject(java.lang.Object)
ObjectOutputStream.java:1148
void java.io.ObjectOutputStream.writeObject(java.lang.Object)
ObjectOutputStream.java:366
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:390
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:377
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:419
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:599
java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
EJBUtils.java:357
java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
hrApp_StatelessSessionBeanWrapper2.java:323
java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
native code
void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
RMICallHandler.java:119
void com.evermind.server.rmi.RMICallHandler.run()
RMICallHandler.java:48
void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
PooledExecutor.java:803
void java.lang.Thread.run()
Thread.java:484
at connection to localhost/127.0.0.1
void com.evermind.server.rmi.OrionRemoteException.receive(java.net.InetAddress, java.lang.String)
OrionRemoteException.java:130
void com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse()
RMIConnection.java:1673
void com.evermind.server.rmi.RMIConnection.run(java.lang.Thread)
RMIConnection.java:532
void com.evermind.server.rmi.RMIConnection.run()
RMIConnection.java:275
void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
PooledExecutor.java:797
void java.lang.Thread.run()
Thread.java:484
Any ideas?
ThanksI would suggest opening a case with [email protected] FWIW, I recall seeing
something like this in WLS 6.0. I believe it is fixed in WLS 6.1
-- Rob
Chris Dupuy wrote:
> Btw, this occurs when I create an stateful session bean that ends up
> throwing an exception and setRollbackOnly() is called. From that point
> forward, my logs fill with this message.
>
> Chris
>
> "Chris Dupuy" <[email protected]> wrote in message
> news:[email protected]..
> > anyone know what this means, and what you can do about it?
> >
> >
> > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
> '14'
> > for queue: 'd
> > efault'> <> <> <000000> <Closing:
> 'weblogic.rjvm.t3.T3JVMConnection@488831'
> > because of: 'Server received a message over an uniniti
> > alized connection: 'JVMMessage from: 'null' to:
> >
> '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
> > beyond
> > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
> > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
> > ffset: '204'''>
> >
> >
> >
-
How can I parse XML from CLOB field? I need to replace or delete the node from XML document and update the database with new XML. I am using Oracle 9i release 2.
Here is the XML. In this XML if section1 and section2 exists then I need to delete the section1 node. If section2 doesn't exist, replace section1 with section2 node.
<Document ID='2' TypeID='2'>
<Body>
<Page Name='Page1'>
<Sec ID='section1' Title='Section 1' GroupID='' />
<Sec ID='section2' Title='Section 2' GroupID='' />
</Page>
</Body>
</Document>
Please help.. Thank you..In 9.2, you are limited into your options. Have a look into, among others, updateXML. Updating tp 10gR2 will give you more options to succeed.
-
Transactional error when using JMS from stateless session bean
I get a transaction exception when committing a bean method responsible for sending to a JMS topic. This happens only occasionally when two separate threads invoke this method "at the same time".
The scenario:
Two separate threads running two different instances of a stateless session bean (slsb A). This ejb (slsb A) has an injected slsb B which is communicating with the the topic.
Both instances of slsb A are utilising the same instance of slsb B.
The CMT transactions for the two threads start in slsb A from methods with transaction attribute "RequiresNew". All nested methods are to other slsbs and have the transaction attribute "Required". The method in slsb B which sends the message is closing both the session and the connection to the topic.
I'm running Glassfish version 9.1_02 (build b04-fcs) and JMS implementation OpenMQ version 4.1.
Stacktrace (glassfish log):
[#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:5754505514139844608 and onePhase:false due to unkown JMSService server error.|#]
[#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe;commit;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation.|#]
[#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;SubscriptionBean;|EJB5018: An exception was thrown during an ejb invocation on [SubscriptionBean]|#]
[#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;|
javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
at $Proxy130.requestNewSubscription(Unknown Source)
at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy129.requestNewSubscription(Unknown Source)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
IMQ broker log:
[09/Sep/2008:13:00:40 CEST] ERROR CommitTransaction: commit failed. Connection ID: 5754505514139844608, Transaction ID: 0:
com.sun.messaging.jmq.jmsserver.util.BrokerException: Unknown Transaction 0
at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.commitTransaction(ProtocolImpl.java:630)
at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.commitTransaction(IMQDirectService.java:1735)
at com.sun.messaging.jms.ra.DirectXAResource.commit(DirectXAResource.java:201)
at com.sun.jts.jtsxa.OTSResourceImpl.commit(OTSResourceImpl.java:114)
at com.sun.jts.CosTransactions.RegisteredResources.distributeCommit(RegisteredResources.java:795)
at com.sun.jts.CosTransactions.TopCoordinator.commit(TopCoordinator.java:2111)
at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:403)
at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
at $Proxy130.requestNewSubscription(Unknown Source)
at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy129.requestNewSubscription(Unknown Source)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Have anyone any idea why this should fail?
Regards,
JonI would suggest opening a case with [email protected] FWIW, I recall seeing
something like this in WLS 6.0. I believe it is fixed in WLS 6.1
-- Rob
Chris Dupuy wrote:
> Btw, this occurs when I create an stateful session bean that ends up
> throwing an exception and setRollbackOnly() is called. From that point
> forward, my logs fill with this message.
>
> Chris
>
> "Chris Dupuy" <[email protected]> wrote in message
> news:[email protected]..
> > anyone know what this means, and what you can do about it?
> >
> >
> > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
> '14'
> > for queue: 'd
> > efault'> <> <> <000000> <Closing:
> 'weblogic.rjvm.t3.T3JVMConnection@488831'
> > because of: 'Server received a message over an uniniti
> > alized connection: 'JVMMessage from: 'null' to:
> >
> '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
> > beyond
> > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
> > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
> > ffset: '204'''>
> >
> >
> >
-
How to catch SQLException from a session bean
Hello
I have a stateless session bean which has a method to persist an entity (User) in the database. In User there is a foreign key (addressId) from another entity (Address). While i was persisting User, i entered a value of addressId which was not present in the Address table. Since there was a foreign key constraint on this field in User i got the following exception:
8:49:49,421 ERROR [JDBCExceptionReporter] ORA-02291:
integrity constraint (FK_USER_ADD) violated - parent key not
found 18:49:49,421 ERROR [AbstractFlushingEventListener]
Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could
not insert: [com.User] at org.hibernate.exception.SQLStateConverter.convert(SQLState
Converter.java:71)So i placed the persist code inside a try block and was catching all the exceptions thrown by persist() method. But these exception are not caught. Instead the exception is sent to the Client end and printed on the client console.
Any clue on how to catch the ConstraintViolationException in the session bean?
ThanksThe problem is that the qry is not executed until you leave your method, so, the exception is catched by the Container. You should issue a entityManager.flush(); rigth "before" leaving the method and you are going to catch all the exceptions given
Cheers -
How to achieve Entity Bean methods ONLY by calling them from a Session Bean
Hi,
I used a session bean as a business facade to a entity bean.
In the session bean I achieve the entity bean with a jndiContext.lookup("java:comp/env/ejbEntityBean").
Now I am looking for a solution that it is only possible to call the entity bean methods or the whole entity bean from the corresponding session bean.
In other words: "How can I forbid the access to the entity bean, if the calling object is not the corresponding session bean?"
--->
I only found a way the regulate the access to the entity bean methods by declaring a security-role.
But the existence of the security-role at runtime depends on the calling user-authorizations!
Is there a way to set the entity-security-role within the session bean context?
Best Regards
SteffenHi Srikanth Reddy.T,
sorry, I am not looking for a special tag <entity-security-role>.
I am looking for a way to specifiy that my session bean "has" the special security-role (in my case "WebZaehlerEjbRole") of my entity bean "in my case "WebZaehlerEjbRole") that is necessary to call the methods (findAlleEntries, findByWindowId,...) of my entity-bean.
Here is the relevant part of my ejb-jar.ml:
<assembly-descriptor>
<security-role>
<role-name>WebZaehlerEjbRole</role-name>
</security-role>
<method-permission>
<description>method-permission</description>
<role-name>WebZaehlerEjbRole</role-name>
<method>
<ejb-name>WebZaehlerBean</ejb-name>
<method-name>findAllEntries</method-name>
<method-params/>
</method>
<method>
<ejb-name>WebZaehlerBean</ejb-name>
<method-name>findByWindowId</method-name>
<method-params>
<method-param>java.lang.Long</method-param>
</method-params>
</method>
Regards,
Steffen -
Problem with connecting from Netweaver Session Bean to SAP R/3
Hi,
i just want a connection to RFC in SAP R/3 and with help of sap ("Proxy generation" etc) and wizard in NWDS i get the rfc. Now i want to connect and use it (like in handbook) but: Every time i create and use jcoclient.connect() system gets an error like:
"Class File Editor
Source not found
The jar file jrfc.jar has no source attachment."
I have add all files that are used to "Used DCs" or bind library into projekt as "Third party library", but the error is still there.
Any idea? Do i have to make something else? Some failure made?
thx
Here is text for connection:
Created on 26.06.2008
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
package com.XXXXXXXXXXXXXXXXX;
import com.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
import com.sap.aii.proxy.framework.core.ApplicationFaultException;
import com.sap.aii.proxy.framework.core.SystemFaultException;
import com.sap.mw.jco.JCO;
@author XXXXX
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
public class MyMainClass extends Object
public static void main(String[] args)
throws ApplicationFaultException, SystemFaultException
JCO.Client jcoclient =
JCO.createClient(
"XXX", //Client
"XXX", //User
"XXX", //Password
"XXX", //Language
"XXX", //Server
"XXX", //System
"XXX"); //Group
jcoclient.connect();
jcoclient.disconnect();
Edited by: Torsten on Aug 27, 2008 10:43 AM
Where can we download SAP NW7.0 (2004s) as Java Trial for testing? We only find ABAP Trial... Link? thxSo we tested some things that are described in the SDN or by SAP with Connectors.
We tested JCO version 2.0.12, 2.1.18 and 3.0 in J2EE Projects in netweaver and in Eclipse (Standalone).
For version 2.0.12 there is a failure that this version is not compatible with the other things in netweaver.
This version is for standalone and integrated sytems.
For version 2.1.18 is only described as standalone and so failure happened in netweaver that other classes are coruppted or missed. The internal test in "content administrator" (Ping and Test) do not work and had the same error.
For version 3.0 (that displace the other two versions) there is many to do in settings and coding that we do not have tested yet because project is not that small to write it for JCO 3.0 only for testing. When we only displaced files in netweaver the server do not start any more.
So:
Is there a way to call R/3 from session bean and 1. create an JCO client or 2. add a client to the "standard" pool of netweaver to use it?
Any ideas? help? links?
Project have to be complete in september...
Our combi is SAP Netweaver 2004 SP21 on Windows XP SP2 / Server 2003 Standard SP1 with JVM 1.4.2_16... need of any more info?
thx
Maybe you are looking for
-
How to create sso login for webcenter application
Hi, i have created a webcenter portal application with a login page.i have to create a sso login for that application . can anyone suggest me how to do?
-
Problems editing adobe 9 pro PDF in adobe X pro
Using Outlook 2007, I created a PDF of all items that were in a folder I created. The version I was using at the time was Adobe Acrobat pro 9. In version 9, I had a field that I could populate called "Jurisdiction", which was available as a column
-
Wasting screen space in German Lightroom 2
Hello, I've compared Lightroom 1.3 and 2.0 both in German and it seems that the new German version takes a *lot* more screen space for its right panel in the develop module to show completely. In the normal view it's okay, but in the crop and repair
-
AddField Properties - Is there a documented order to set them?
Today I experienced something odd. Using the code below my text fields were all being added correctly and formatted "mostly" corrected except with respect to the textSize property. Using this code the textSize property will not set. var f = this.addF
-
Promoting org values in development system
Hello, I have to promote org value called LEC in the development system. Can anyone suggest me how to do this. Thanks