[EJB/JBoss] - Problem by accessing Entity Bean
by thomas2008ch
I created a table as follow:
| create table Book(
| ID VARCHAR2(10 BYTE) NOT NULL,
| Name VARCHAR2(40 BYTE),
| Author VARCHAR2(10 BYTE),
| Public_Date DATE,
| Description VARCHAR2(15 BYTE),
| primary key (id)
| )
|
| insert into book values('01', 'My Book', 'Wei Chen', to_date('19960725','YYYYMMDD'), 'No Comment');
|
Then I created an Entity Bean "BookBean" with XDoclet based on this table. The XDoclet generated several java files such as BookBean.java, BookCMP.java etc.
I deployed the EAR to the JBoss 4.2.2. GA.
Then I try to access the Entity Bean from a Standalone Client. The code looks as follow:
| ...
| Book book = null;
| try {
| BookHome bookHome = BookUtil.getHome();
| book = bookHome.create();
|
| } catch (Exception exception) {
| exception.printStackTrace();
| }
| ...
|
But I get Exception as follow:
|
| javax.ejb.CreateException: Error checking if entity exists:java.sql.SQLException: invalid schema name: TEST in statement [SELECT COUNT(*) FROM TEST.BOOK WHERE ID=?]
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:105)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:150)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
| at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225)
| at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:779)
| 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 org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
| at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
| at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
| at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
| at org.jboss.ejb.Container.invoke(Container.java:981)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:231)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
| at $Proxy16.invoke(Unknown Source)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:183)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy2.create(Unknown Source)
| at com.wei.chen.test.TestClient.main(TestClient.java:22)
|
In the class "BookBean.java" there is a function as follow which is automatically created by XDoclet:
| public java.lang.String ejbCreate() throws javax.ejb.CreateException {
| // EJB 2.0 spec says return null for CMP ejbCreate methods.
| // TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
| // setMyField("Something");
| // begin-user-code
| this.setId("01");
| return null;
| // end-user-code
| }
| ...
|
The code "this.setId("01");" was added by me.
Any tips?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153412#4153412
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153412
17 years, 11 months
[JBoss Messaging] - Another JMS cluster config question
by jorgemoralespou_2
I have set up a 2 node cluster in one machine, as stated in the docs, and when I deploy an app that has a Queue defined and a consumer (which works fine in a cluster in 2 separate machines) I get the following errror:
| 2008-05-26 17:58:56,449 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to 16.38.25.134:1100
| javax.naming.CommunicationException: Failed to connect to server 16.38.25.134:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 16.38.25.134:1100 [Root exception is java.net.ConnectException: Connection refused]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.resource.adapter.jms.JmsManagedConnection.setup(JmsManagedConnection.java:708)
| at org.jboss.resource.adapter.jms.JmsManagedConnection.<init>(JmsManagedConnection.java:184)
| at org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.createManagedConnection(JmsManagedConnectionFactory.java:106)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:512)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:326)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:389)
| at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createQueueSession(JmsSessionFactoryImpl.java:144)
| at com.hp.som.handlers.jms.QueueWrapper.createSession(QueueWrapper.java:89)
| at com.hp.som.handlers.jms.DestinationWrapper.sendMessage(DestinationWrapper.java:131)
|
Do I have to change the NamingServicePort somewhere, as it seems it is using the defaults.
Although I get this message, message seems to be dispatched to the queue. Don't know how!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153408#4153408
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153408
17 years, 11 months
[Beginners Corner] - Jboss Error causing application slowness
by msalameh
Hello,
Can someone please shed some light on the following error in my log file:
2008-05-26 10:15:23,204 ERROR [STDERR] javax.ejb.EJBException: rsp=sender=vptaprd:2402, retval=null, received=false, suspected=false
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.ejb.services.cachemanager.CacheManagerBean.put(CacheManagerBean.java:50)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-05-26 10:15:23,204 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:954)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
2008-05-26 10:15:23,204 ERROR [STDERR] at $Proxy138.put(Unknown Source)
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.beans.LookupListBean.getLookupData(LookupListBean.java:157)
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.beans.LookupListBean.getLookupData(LookupListBean.java:87)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2008-05-26 10:15:23,204 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-05-26 10:15:23,204 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.tags.ExtractPropertyTag.getProperty(ExtractPropertyTag.java:132)
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.tags.ExtractPropertyTag.doEndTag(ExtractPropertyTag.java:67)
2008-05-26 10:15:23,204 ERROR [STDERR] at pta.pages.searchtransaction_jsp._jspx_meth_pta_extract_0(Unknown Source)
2008-05-26 10:15:23,204 ERROR [STDERR] at pta.pages.searchtransaction_jsp._jspService(Unknown Source)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
2008-05-26 10:15:23,204 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
2008-05-26 10:15:23,204 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2008-05-26 10:15:23,204 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2008-05-26 10:15:23,204 ERROR [STDERR] at com.dwsolutions.pta.util.CheckLogonFilter.doFilter(CheckLogonFilter.java:86)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
2008-05-26 10:15:23,204 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
2008-05-26 10:15:23,204 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
Any feedback would be appreciated very much thank you
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153403#4153403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153403
17 years, 11 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: EntityManager throws a nullpointerexception JBOSS 4.2.2G
by jaikiran
anonymous wrote : SystemUser _SystemUser = new Query().AuthenticateUser("july","1234");
Here's the problem :)
You are using the Query class as just another java class and instantiating it on your own. As a result you are not getting access to the additional services which the application server injects in the EJB.
Any EJB clients, need to lookup the EJB to be able to avail the services provided by the server. You might have to read through some examples which explain how to lookup the EJB from a client. Usually, this is how it is done:
//assuming the server and the client are on the same server,
| //else pass context properties
| javax.naming.Context ctx = new javax.naming.InitialContext();
|
| QueryInt bean = (QueryInt) ctx.lookup("QueryBeanJNDIName");// this is the jndi-name to which the bean is bound.
|
| SystemUser _SystemUser = bean.AuthenticateUser("july","1234");
| if (_SystemUser != null)
| System.out.println(_SystemUser.getIdSystemUser());
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153396#4153396
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153396
17 years, 11 months
[JBoss jBPM] - BPEL Eclipse designer deployment error
by gllambi
Hi, I've been using BPEL Eclipse Designer and when I try to deploy the process the following exception occurs:
11:10:24,639 ERROR [ProblemHandler] document is not readable ()
java.io.FileNotFoundException: C:\jboss-4.2.2.GA_JBPM\bin (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLC
onnection.java:105)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
urce)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
...
11:10:24,654 ERROR [ProblemHandler] could not read wsdl document (ExcepcionBPELD
esigner.bpel)
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing
''.: java.io.FileNotFoundException: C:\jboss-4.2.2.GA_JBPM\bin (Access is denie
d)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2111)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2303)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2335)
at org.jbpm.bpel.xml.BpelReader.readImportWsdlDefinition(BpelReader.java
:519)
at org.jbpm.bpel.xml.BpelReader.readImports(BpelReader.java:447)
at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:296)
at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:204)
...
11:10:24,670 ERROR [STDERR] [Fatal Error] :-1:-1: Premature end of file.
11:10:24,670 ERROR [ProblemHandler] could not read wsdl document (ExcepcionBPELD
esigner.bpel)
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing
'ExcepcionBPELDesignerArtifacts.wsdl'.: org.xml.sax.SAXParseException: Prematur
e end of file.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2111)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2303)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2335)
at org.jbpm.bpel.xml.BpelReader.readImportWsdlDefinition(BpelReader.java
:519)
The problem is because of the artifact.wsdl created by the designer when adding partners to the process. If I put the partner in the service's wsdl and change the bpel's import manually it works fine.
The bpel and wsdl files are the following
| <?xml version="1.0" encoding="UTF-8"?>
| <bpws:process exitOnStandardFault="yes" name="ExcepcionBPELDesigner"
| suppressJoinFailure="yes"
| targetNamespace="http://lins.errores.bpel.designer"
| xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
| xmlns:ns="http://lins.errores.bpel.designerArtifacts"
| xmlns:ns0="http://www.fing.edu.uy/ReservaPaquetesViaje/" xmlns:tns="http://lins.errores.bpel.designer">
| <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
| location="ExcepcionBPELDesigner.wsdl" namespace="http://www.fing.edu.uy/ReservaPaquetesViaje/"/>
| <bpws:import importType="http://schemas.xmlsoap.org/wsdl/" namespace="http://lins.errores.bpel.designerArtifacts"/>
| <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
| location="ExcepcionBPELDesignerArtifacts.wsdl" namespace="http://lins.errores.bpel.designerArtifacts"/>
| <bpws:partnerLinks>
| <bpws:partnerLink myRole="ErrorMaker" name="Client" partnerLinkType="ns:ErrorPartner"/>
| </bpws:partnerLinks>
| <bpws:variables>
| <bpws:variable messageType="ns0:reservacion" name="ClientRequest"/>
| <bpws:variable messageType="ns0:reservacionResponse" name="ClientResponse"/>
| </bpws:variables>
| <bpws:sequence>
| <bpws:receive createInstance="yes" name="Receive"
| operation="reservarPaqueteViaje" partnerLink="Client"
| portType="ns0:ReservaPaquetesViaje" variable="ClientRequest"/>
| <bpws:reply name="Reply" operation="reservarPaqueteViaje"
| partnerLink="Client" portType="ns0:ReservaPaquetesViaje" variable="ClientResponse"/>
| </bpws:sequence>
| </bpws:process>
|
| <?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
| xmlns:tns="http://www.fing.edu.uy/ReservaPaquetesViaje/"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| name="ReservaPaquetesViaje"
| targetNamespace="http://www.fing.edu.uy/ReservaPaquetesViaje/">
| <wsdl:types>
| <xsd:schema
| targetNamespace="http://www.fing.edu.uy/ReservaPaquetesViaje/">
| <xsd:element name="reservacion">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="hotel" type="tns:Hotel" />
| <xsd:element name="habitaciones" type="tns:Habitacion" />
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| <xsd:element name="reservacionResponse">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="codigoReserva" type="xsd:string" />
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:complexType name="Hotel">
| <xsd:sequence>
| <xsd:element name="idHotel" type="xsd:int"/>
| <xsd:element name="nombre" type="xsd:string"/>
| </xsd:sequence>
| </xsd:complexType>
|
| <xsd:complexType name="Habitacion">
| <xsd:sequence>
| <xsd:element name="idHabitacion" type="xsd:int"/>
| <xsd:element name="cantCamas" type="xsd:int"/>
| </xsd:sequence>
| </xsd:complexType>
|
| </xsd:schema>
| </wsdl:types>
| <wsdl:message name="reservacion">
| <wsdl:part element="tns:reservacion" name="parameters" />
| </wsdl:message>
| <wsdl:message name="reservacionResponse">
| <wsdl:part name="parameters" element="tns:reservacionResponse" />
| </wsdl:message>
| <wsdl:portType name="ReservaPaquetesViaje">
| <wsdl:operation name="reservarPaqueteViaje">
| <wsdl:input message="tns:reservacion" name="reserva" />
| <wsdl:output message="tns:reservacionResponse"
| name="codigoReserva" />
| </wsdl:operation>
| </wsdl:portType>
|
| </wsdl:definitions>
|
| <?xml version="1.0" encoding="UTF-8"?>
| <definitions xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://lins.errores.bpel.designerArtifacts" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://www.fing.edu.uy/ReservaPaquetesViaje/" name="ExcepcionBPELDesignerArtifacts" targetNamespace="http://lins.errores.bpel.designerArtifacts" xmlns="http://schemas.xmlsoap.org/wsdl/">
| <plnk:partnerLinkType name="ErrorPartner">
| <plnk:role name="ErrorMaker" portType="wsdl:ReservaPaquetesViaje"/>
| </plnk:partnerLinkType>
| <import location="ExcepcionBPELDesigner.wsdl" namespace="http://www.fing.edu.uy/ReservaPaquetesViaje/"/>
| </definitions>
|
Thanks!
Guzman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153395#4153395
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153395
17 years, 11 months