[EJB3] - returned values are empty!
by Joseph Hwang
Joseph Hwang [http://community.jboss.org/people/aupres] created the discussion
"returned values are empty!"
To view the discussion, visit: http://community.jboss.org/message/621968#621968
--------------------------------------------------------------
I coded 2 entity class and joined them with @ManyToOne annotation like below
- Members.java
@Entity
@Table(name = "family")
public class Members implements Serializable {
@Id
@Column(name = "EMP_ID")
private String id ;
@Column(name = "EMP_Passwd")
private String passwd ;
@Column(name = "EMP_Name")
private String name ;
@Column(name="EMP_Record")
@OneToMany(fetch=FetchType.EAGER, mappedBy="member", cascade=CascadeType.ALL)
private List<Records> record;
...getter and setter method...
public List<Records> getRecord() {
return record;
}
public void setRecord(List<Records> record) {
this.record = record;
}
}
- Records.java
@Entity
@Table(name = "info")
public class Records implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name = "EMP_ID")
private int i;
@ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
@JoinColumn(name="EMP_Record")
private Members member;
@Column(name = "EMP_Bank_Account")
private String account;
@Column(name = "EMP_Hobby")
private String hobby;
@Column(name = "EMP_Phone")
private int phone;
...getter and setter method..
}
EntityManager.persist is OK. Data were inserted well. But Members.getRecord() method is problem.
In Bean class I coded to return value List<Records> like below
@Stateless
public class MappingTestBean implements IMappingTestPort {
@PersistenceContext(unitName="MyFamily")
EntityManager em;
public List<Records> getFamilyMember(String name) {
// TODO Auto-generated method stub
Members m = (Members)em.find(Members.class, name); *// EntityManager.find() works well*
System.out.println(m.toString()); *// The method prints some value*
List<Records> records = m.getRecord(); *// getRecord() return empty value*
System.out.println(records.toString());
return records;
}
}
in console
Joined select is executed well.
[STDOUT] Hibernate: select members0_.EMP_ID as EMP1_49_1_, members0_.EMP_Name as EMP2_49_1_, members0_.EMP_Passwd as EMP3_49_1_, record1_.EMP_Record as EMP5_3_, record1_.EMP_ID as EMP1_3_, record1_.EMP_ID as EMP1_50_0_, record1_.EMP_Bank_Account as EMP2_50_0_, record1_.EMP_Hobby as EMP3_50_0_, record1_.EMP_Record as EMP5_50_0_, record1_.EMP_Phone as EMP4_50_0_ from family members0_ left outer join info record1_ on members0_.EMP_ID=record1_.EMP_Record where members0_.EMP_ID=?
But records value is empty nor null.
I need your advice! Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621968#621968]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss AOP] - Adding @Schedule annotation using AOP is not working
by Eman Emanovic
Eman Emanovic [http://community.jboss.org/people/emanovic] created the discussion
"Adding @Schedule annotation using AOP is not working"
To view the discussion, visit: http://community.jboss.org/message/623183#623183
--------------------------------------------------------------
Hi,
I am trying to create schedule event using EJB3.1 @Schedule annotation. Everything works fine as long as I have the annotation inside my bean. Because I want to be able to change schedule in deploy time without repacking ear. So I want to add this annotation using AOP. But it doesn't work.
Here is my sample bean:
@AspectDomain(value = "TimerBeanDomain")
@Singleton
public class TimerBean {
public void timerMethod() {
System.out.println("Timer method activated");
}
}
And here is my aop.xml:
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">
<domain name="TimerBeanDomain">
<annotation expr="method(void *->timerMethod(..))>
@javax.ejb.Schedule(second=*/30, minute=*, hour=*")
</annotation>
</domain>
</aop>
Bean is packed inside -ejb.jar, which is packed in .ear. AOP file is outside ear file.
There are no errors in console. It just does not work.
I tried it with stateless bean as well. In this case aop.xml looked like:
<domain name="TimerBeanDomain" extends="Stateless Bean" inheritBindings="true">
I tried JBoss 6.0.1 and JBoss 6.1.0 with same result. At least is there some way how to debug AOP process of adding annotation?
Any help will be appreciated.
Regards,
Eman
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/623183#623183]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[Beginner's Corner] - Error deploying ear file to jboss 6x
by Jeremiah Twidwell
Jeremiah Twidwell [http://community.jboss.org/people/jeremy0] created the discussion
"Error deploying ear file to jboss 6x"
To view the discussion, visit: http://community.jboss.org/message/621536#621536
--------------------------------------------------------------
Here's the stack trace on server startup..
15:23:57,064 INFO [AbstractJBossASServerBase] Server Configuration:
JBOSS_HOME URL: file:/C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/
Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml
Common Base: $JBOSS_HOME\common/
Common Library: $JBOSS_HOME\common/lib/
Server Name: default
Server Base: $JBOSS_HOME\server/
Server Library: $JBOSS_HOME\server/default/lib/
Server Config: $JBOSS_HOME\server/default/conf/
Server Home: $JBOSS_HOME\server/default/
Server Data: $JBOSS_HOME\server/default/data/
Server Log: $JBOSS_HOME\server/default/log/
Server Temp: $JBOSS_HOME\server/default/tmp/
15:23:57,064 INFO [AbstractServer] Starting: JBossAS [6.1.0.SNAPSHOT "Neo"]
15:23:59,170 INFO [ServerInfo] Java version: 1.6.0_26,Sun Microsystems Inc.
15:23:59,170 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
15:23:59,170 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 20.1-b02,Sun Microsystems Inc.
15:23:59,170 INFO [ServerInfo] OS-System: Windows 7 6.1,amd64
15:23:59,170 INFO [ServerInfo] VM arguments: -Dprogram.name=JBossTools: JBoss 6.1 -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=C:\Users\jtwidwell\Desktop\jboss-6.1.x\jboss-6.1.0-SNAPSHOT\lib\endorsed -Djava.library.path=C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/bin/native -Dlogging.configuration=file:C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/bin/logging.properties -Xms512m -Xmx1024m -Dfile.encoding=Cp1252
15:23:59,233 INFO [JMXKernel] Legacy JMX core initialized
15:24:05,036 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA
15:24:05,817 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
15:24:57,874 ERROR [AbstractKernelController] Error installing to Parse: name=vfs:///C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/server/default/deploy/wfm-ear-6.0.10-SNAPSHOT-jboss.ear state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/server/default/deploy/wfm-ear-6.0.10-SNAPSHOT-jboss.ear/WFM.war/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.2.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:383) [:2.2.2.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:343) [:2.2.2.GA]
at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:99) [:6.1.0-SNAPSHOT]
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:315) [:2.2.2.GA]
at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:80) [:6.1.0-SNAPSHOT]
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:255) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0-SNAPSHOT]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0-SNAPSHOT]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0-SNAPSHOT]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990) [:1.6.0_26]
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:263) [jbossxb.jar:2.0.3.GA]
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:231) [jbossxb.jar:2.0.3.GA]
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.2.GA]
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.2.GA]
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.2.GA]
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.2.GA]
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.2.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.2.GA]
... 50 more
The other part to the error follows..
16:14:04,515 ERROR [ProfileServiceBootstrap] Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
Deployment "vfs:///C:/Users/jtwidwell/Desktop/jboss-6.1.x/jboss-6.1.0-SNAPSHOT/server/default/deploy/wfm-ear-6.0.10-SNAPSHOT-jboss.ear" is in error due to the following reason(s): java.lang.ClassCastException
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0-SNAPSHOT]
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0-SNAPSHOT]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0-SNAPSHOT]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
16:14:04,532 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
16:14:04,537 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009
16:14:04,538 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.SNAPSHOT "Neo"] Started in 44s:520ms
These are the jars that are getting deployed along with the .ear.. I don't know if any are conflicting with some jboss jar files in 6.0...
activation-1.1.jar
antlr-2.7.6.jar
asm-1.5.3.jar
asm-attrs-1.5.3.jar
cglib-2.1_3.jar
commons-vfs-2.0-2009...jar
commons-beanutils-1.6....jar
commons-collections-3...jar
commons-digester-1.8.jar
commons-fileupload-1...jar
commons-javaflow-200...jar
commons-lang-2.1.jar
commons-logging-1.1.1.jar
commons-validator-1.1.jar
dom4j-1.6.1.jar
hibernate-3.2.5.ga.jar
itext-1.3.1.jar
...
jcommon-1.0.0-rc1.jar
log4j-1.2.8.jar
struts-1.1.jar
struts-legacy-1.1.jar
...
xml-apis-1.3.02.jar
..and web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd>
<web-app id="WebApp_2">
<display-name>WFM</display-name>
<description>WFM</description>
<distributable/>
<listener>
<listener-class>com.tomax.session.IdmSessionListener</listener-class>
</listener>
<listener>
<listener-class>com.ulcjava.container.servlet.server.HttpSessionListener</listener-class>
</listener>
<servlet id="Servlet_1">
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param id="InitParam_1">
<param-name>config</param-name>
<param-value>/WEB-INF/TA/struts-config.xml,/WEB-INF/WFM/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet id="Servlet_1a">
<servlet-name>CacheUpdateServlet</servlet-name>
<servlet-class>com.tomax.cache.servlets.CacheUpdateServlet</servlet-class>
<init-param id="InitParam_1a">
<param-name>appServer</param-name>
<param-value>WFM</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet id="Servlet_2">
<servlet-name>WeeklySchedule</servlet-name>
<servlet-class>com.ulcjava.container.servlet.server.ServletContainerAdapter</servlet-class>
<init-param id="InitParam_2">
<param-name>application-class</param-name>
<param-value>com.tomax.wfm.ulc.weeklyschedule.WeeklySchedule</param-value>
</init-param>
<init-param id="InitParam_3">
<param-name>log-level</param-name>
<param-value>WARNING</param-value>
</init-param>
</servlet>
<servlet id="Servlet_3">
<servlet-name>DailySchedule</servlet-name>
<servlet-class>com.ulcjava.container.servlet.server.ServletContainerAdapter</servlet-class>
<init-param id="InitParam_4">
<param-name>application-class</param-name>
<param-value>com.tomax.wfm.ulc.dailyschedule.DailySchedule</param-value>
</init-param>
<init-param id="InitParam_5">
<param-name>log-level</param-name>
<param-value>WARNING</param-value>
</init-param>
</servlet>
<servlet id="Servlet_5">
<servlet-name>TimeCardsApplet</servlet-name>
<servlet-class>com.ulcjava.container.servlet.server.ServletContainerAdapter</servlet-class>
<init-param id="InitParam_6">
<param-name>application-class</param-name>
<param-value>com.tomax.ta.ulc.timecards.controller.TimeCardsULCApplet</param-value>
</init-param>
<init-param id="InitParam_7">
<param-name>log-level</param-name>
<param-value>WARNING</param-value>
</init-param>
</servlet>
<servlet id="Servlet_6">
<servlet-name>TimeCards</servlet-name>
<servlet-class>com.ulcjava.container.servlet.server.ServletContainerAdapter</servlet-class>
<init-param id="InitParam_8">
<param-name>application-class</param-name>
<param-value>com.tomax.ta.ulc.timecards.controller.TimeCardsULC</param-value>
</init-param>
<init-param id="InitParam_9">
<param-name>log-level</param-name>
<param-value>WARNING</param-value>
</init-param>
</servlet>
<servlet id="Servlet_4">
<servlet-name>JnlpDownloadServlet</servlet-name>
<servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
</servlet>
<servlet-mapping id="ServletMapping_2">
<servlet-name>WeeklySchedule</servlet-name>
<url-pattern>/weeklyschedule.ulc</url-pattern>
</servlet-mapping>
<servlet-mapping id="ServletMapping_1">
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping id="ServletMapping_3">
<servlet-name>DailySchedule</servlet-name>
<url-pattern>/dailyschedule.ulc</url-pattern>
</servlet-mapping>
<servlet-mapping id="ServletMapping_4">
<servlet-name>CacheUpdateServlet</servlet-name>
<url-pattern>/CacheUpdateServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TimeCards</servlet-name>
<url-pattern>/timecards_jnlp</url-pattern> <!-- called within .jnlp file -->
</servlet-mapping>
<servlet-mapping>
<servlet-name>TimeCardsApplet</servlet-name>
<url-pattern>/timecards_applet</url-pattern> <!-- called within .jsp file -->
</servlet-mapping>
<!--config session timeout in minutes-->
<session-config>
<session-timeout>20</session-timeout>
</session-config>
<welcome-file-list id="WelcomeFileList_1">
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<taglib id="TagLibRef_2">
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_3">
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_4">
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_5">
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</web-app>
Any help is always appreciated. Trying to migrate from jboss 4.3 to jboss 6.1..
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621536#621536]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a jta-data-source
by Rajan Bansal
Rajan Bansal [http://community.jboss.org/people/rajan01] created the discussion
"Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a jta-data-source"
To view the discussion, visit: http://community.jboss.org/message/623092#623092
--------------------------------------------------------------
Hi,
My error is:
*java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a jta-data-source for a JTA enabled persistence context named: org.jbpm.task*
at org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:115)
at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275)
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:597)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
and so on......
*My persistence .xml (Present in jbpm-human-task-5.1.0.Final\META-INF) a jar file:*
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@xxx.xx.x.xxx:1521:lupin" />
<property name="hibernate.connection.username" value="xxxxxx"/>
<property name="hibernate.connection.password" value="xxx"/>
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="validate" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
*And my testDS1-ds.xml is:*
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/testDS1</jndi-name>
<connection-url>jdbc:oracle:thin:@xxx.xx.x.xxx:1521:lupin</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>xxxx</user-name>
<password>xxxxx</password>
</local-tx-datasource>
</datasources>
*Apart from my original Persistence.xml I chaged this file as follows but nothing helps:*
<persistence-unit name="org.jbpm.task">
<jta-data-source>jdbc/testDS1</jta-data-source>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
*Please provide the solution: And I dont want to delete my persistence.xml.*
*Regards*
*Rajan Bansal
*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/623092#623092]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[EJB3] - JBoss AS 7.0.1 and EJB 3 lookup
by Dmitry Paykin
Dmitry Paykin [http://community.jboss.org/people/paykin] created the discussion
"JBoss AS 7.0.1 and EJB 3 lookup"
To view the discussion, visit: http://community.jboss.org/message/622860#622860
--------------------------------------------------------------
Hello,
I deploy my app as 2 separate deployments: EAR and WAR.
I put my EJB interfaces inside both WAR and JAR inside EAR.
When I trying to lookup EJB from WAR I recieve exception:
java.lang.ClassCastException: ruleEngine.api.ApplicationData$$$view12 cannot be cast to org.omg.CORBA.Object
at org.jboss.com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:225) [jboss-rmi-api_1.0_spec-1.0.1.Final.jar:1.0.1.Final]
or simple ClassCastException when I just cast the class without narrowing.
The application worked fine in JBoss 6, only when I put property
properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
to InitialContext. When I removed the property, I started to recieve the same error as on JB7.
Unfortunatelly, I can not create separate jar with interfaces, because of dependencies exist in the project. Because of the same problem I can not include EAR JAR in WAR's classpath.
Any help?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622860#622860]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months