[Installation, Configuration & DEPLOYMENT] - Struts + ClassLoading
by thanz@gmx.at
Hello
We are using JBoss 5.0.1 and we try to make a new Web App.
So, first we have an EAR with all jars in it.
Then we have a WAR which contains just the core.
The EAR get deployed, we can start it and we see the page(index).
But when we try to add struts(1.x.x) we get some problems.
Fist, when we add struts.jar to the EAR the class-Loader doesnt find it.
We get the error :
| 2009-05-19 09:54:10,156 WARN [org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE] (main) Cannot load servlet class: org.apache.struts.action.ActionServlet
|
When we add struts.jar to WEB-INF/lib in the WAR he finds it.
In our other Project we have all jars in the EAR and everything works fine.
Our 2nd Problem :
In struts-config.xml we defined that the MessageResourceFactory Class is in a specific package. We added that JAR to the EAR but he cant find it.
| package not found xx.xx.xxx.xxx_xxxxx.xxx.mymessageresource
| defined package: xx.xx.xxx.xxx_xxxxx.xxx.mymessageresource
| loadClass org.apache.struts.util.MessageResourcesFactory resolve=false
|
In the other Project everything works fine :
| package not found xx.xx.xxx.xxx_xxxxx.xxx.mymessageresource
| defined package: xx.xx.xxx.xxx_xxxxx.xxx.mymessageresource
| loaded class locally class xx.xx.xxx.xxx_xxxxx.xxx.mymessageresource.MyMessageResourceFactory{cl=BaseClassLoader@1499c0f{vfszip:/D:/ENTWICKLUNG/dv-java/jboss-5.0.1.GA/server/default/deploy/xxxxxx.ear/} codeSource=(jar:file:/D:/ENTWICKLUNG/dv-java/jboss-5.0.1.GA/server/default/deploy/xxxxxx.ear!/xxx_xxxxxxx.jar <no signer certificates>)}
|
So why does on Project find the Class in the Jar, and the other doesnt ?
We are using the same Jboss, we just wanted to do a new EAR.
Anyone can help ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231792#4231792
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231792
16 years, 11 months
[Beginners Corner] - Re: URGENT! java.lang.IllegalStateException: Failed to find
by tmac42
I've the same problem but i've fixed it.
i'm working with JBOSS 4.0.
personaly in my pc IIS services was running, and that was the problem, so i've stopped it : start -> configuration pannel -> administration tools -> services -> stop IIS
after that it works!! when I started the client
my client code :
public static void main(String[] args) {
| String str = "This is the string being counted in the EJB.";
| Hashtable environment = new Hashtable();
|
| environment.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
|
| environment.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
|
| environment.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
|
| Ccount cc = null;
| try {
| CcountHome home = CcountUtil.getHome(environment);
| cc = home.create();
| System.out.println(str);
| System.out.println(" Upper case: " + cc.upper(str));
| System.out.println(" Lower case: " + cc.lower(str));
| System.out.println(" Spaces: " + cc.spaces(str));
| System.out.println(" Total: " + cc.characters(str));
|
| } catch (Exception e) {
|
| e.printStackTrace();
|
| }
|
|
|
|
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231781#4231781
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231781
16 years, 11 months
[JBoss jBPM] - JBPM4 - Asyn_continous problem, asyncExecute activity failed
by galanfish
hello everyone,
i've defined a process like this:
ClientProcessDefinition p = ProcessDefinitionBuilder.startProcess("test")
|
| .startActivity("start", StartActivity.class)
| .transition("fork", "fork")
| .initial()
| .endActivity()
|
| .startActivity("fork", ForkActivity.class)
| .transition("one", "one")
| .transition("two", "two")
| .endActivity()
|
| .startActivity("one", OneActivity.class)
| .asyncExecute() // asyncExecute
| .transition("join", "join")
| .endActivity()
| .startActivity("two", OneActivity.class)
| .asyncExecute() // asyncExecute
| .transition("join", "join")
| .endActivity()
|
| .startActivity("join", JoinActivity.class)
| .transition("end", "end")
| .needsPrevious()
| .endActivity()
|
| .startActivity("end", EndActivity.class)
| .endActivity()
|
| .endProcess();
i deployed the process definition and then tested it via the executionService, exception occurs:
### EXCEPTION ###########################################
| 2009-05-19 11:09:43,906 SEV | [JobExecutorThread] exception in job executor thread
| org.hibernate.WrongClassException: Object with id: 11 was not of the specified subclass: org.jbpm.pvm.internal.job.TimerImpl (loaded object was of wrong class class org.jbpm.pvm.internal.model.op.ExecuteActivityMessage)
| at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:1243)
| at org.hibernate.loader.Loader.getRow(Loader.java:1195)
| at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
| at org.hibernate.loader.Loader.doQuery(Loader.java:701)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
| at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
| at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
| at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
| at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
| at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
| at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
| at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:213)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:202)
| at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:415)
| at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:27)
| at org.hibernate.engine.CascadingAction$1.getCascadableChildrenIterator(CascadingAction.java:125)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:294)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:307)
| at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:246)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:141)
| at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:775)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:758)
| at org.hibernate.engine.Cascade.deleteOrphans(Cascade.java:355)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:324)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
| at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:57)
| at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:109)
| at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:68)
| at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:64)
| at org.jbpm.pvm.internal.service.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:41)
| at org.jbpm.pvm.internal.service.RetryInterceptor.execute(RetryInterceptor.java:37)
| at org.jbpm.pvm.internal.jobexecutor.JobExecutorThread.run(JobExecutorThread.java:66)
anyone help me...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231780#4231780
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231780
16 years, 11 months