[EJB 3.0] New message: "Issue specifying the <jar-file> in persistence.xml in JBOSS 5 on linux system"
by Dragos Bobes
User development,
A new message was posted in the thread "Issue specifying the <jar-file> in persistence.xml in JBOSS 5 on linux system":
http://community.jboss.org/message/519291#519291
Author : Dragos Bobes
Profile : http://community.jboss.org/people/dbobes
Message:
--------------------------------------------------------------
Hello,
My application deploys without any errors in JBOSS 5.1.0GA on a windows system but it fails when deployed in JBOSS 5.1.0GA on Red Hat 5.1.
This is my ear file structure:
myapp.ear
+- lib/
| +- extejbmodule.jar
| +- ...
+- META-INF/
| +- persistence.xml
| +- ...
+- myseammodule.jar
+- mywebmodule.war
+- ...
Right now the myseammodule.jar also contains the JPA entity mappings and I added the <jar-file> tag to my persistence.xml to have this jar scanned for mappings. The persistence.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Persistence deployment descriptor for prod profile -->
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="myapppu">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/jdbc/myAppDS</jta-data-source>
<jar-file>myapp.ear/myseammodule.jar</jar-file>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<property name="hibernate.hbm2ddl.auto" value="none"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.jdbc.batch_size" value="20"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/myappEntityManagerFactory"/>
</properties>
</persistence-unit>
</persistence>
When the ear is deployed on JBOSS 5.1.0GA on a linux system (Red Hat 5.1) the server throws an error:
2010-01-11 09:31:38,554 ERROR org.jboss.kernel.plugins.dependency.AbstractKernelController (HDScanner) Error installing to Start: name=persistence.unit:unitName=myapp.ear/#myapppu state=Create java.lang.RuntimeException: could not find relative path: myapp.ear/myseammodule.jar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.jpa.deployment.PersistenceUnitDeployment.getRelativeURL(PersistenceUnitDeployment.java:208) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:267) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
DEPLOYMENTS IN ERROR:
Deployment "" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=myapp.ear/#myapppu' **
Deployment "persistence.unit:unitName=myapp.ear/#myapppu" is in error due to the following reason(s): java.lang.RuntimeException: could not find child 'myapp.ear\myapppu.jar' on 'DelegatingHandler@1179491551[path= context=file:/usr/local/jboss-5.1.0.GA/server/default/tmp/a3p5u2o-ls1ivl-g4bbjti5-1-g4bcqt45-as/myapp.ear real=vfszip:/usr/local/jboss-5.1.0.GA/server/default/tmp/a3p5u2o-ls1ivl-g4bbjti5-1-g4bcqt45-as/myapp.ear]'
One note, the Server bean is from extejbmodule.jar (I'm not sure if this is important).
Any ideas why this configuration doesn't work on the linux system?
Thank you,
Dragos
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519291#519291
16 years, 3 months
[jBPM] New message: "Re: How to terminate a forked process"
by Jas Lam
User development,
A new message was posted in the thread "How to terminate a forked process":
http://community.jboss.org/message/519289#519289
Author : Jas Lam
Profile : http://community.jboss.org/people/lamj1
Message:
--------------------------------------------------------------
Using the same jpdl file above
I run the following unitTest
1) Is this the correct way of ending a forked execution?
2) How to resolve the execption?
My unit test set up is pretty standard
protected void setUp() throws Exception {
super.setUp();
//add user to database
identityService.createUser("testUser", "testUser", "testUser", "mailto:testUser@ssoa.com");
workflowManager = new WorkflowManager();
deploymentFork = repositoryService.createDeployment()
.addResourceFromClasspath("test/ssoa/jbpm/manager/ForkSubProcess.jpdl.xml").deploy();
}
public void testForking()
{
ProcessInstance processInstance = workflowManager.startProcess("ForkSubProcess");
String pid = processInstance.getId();
Execution mainExe = executionService.findExecutionById(pid);
((ExecutionImpl)mainExe).end(); <--- line 99 Exception here
}
09:48:00,642 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
09:48:00,642 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: no environment to get org.jbpm.pvm.internal.session.RepositorySession
org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:197)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1120)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:373)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:325)
at test.ssoa.jbpm.manager.WorkflowManagerTest.testForking(WorkflowManagerTest.java:99)
1) How would I be able to get all executions? executionService doesn't provide such interface.
> kukeltje wrote:
>
> Getting all executions and ending them should work.
>
Thank you
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519289#519289
16 years, 3 months
[JBoss Web Services] New message: "Re: [beginner] Deploying a ear file under JBoss AS 5"
by Peter Johnson
User development,
A new message was posted in the thread "[beginner] Deploying a ear file under JBoss AS 5":
http://community.jboss.org/message/519288#519288
Author : Peter Johnson
Profile : http://community.jboss.org/people/peterj
Message:
--------------------------------------------------------------
This extra error message helps:
> sarko86 wrote:
>
> The content
> of element type "servlet-mapping" must match "(servlet-name,url-pattern)". @ vfs
> zip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/example2.war/WEB-INF/
> web.xml[16,21]
JBoss AS 5 is striucter whne it comes to following the web.xml file layout thatn what AS 4.x was. The issue is that you have the servlet-name and url-pattern in the wriong order; it should be:
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/servlet/HelloWorld</url-pattern>
</servlet-mapping>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519288#519288
16 years, 3 months