Deploying ejb-jar when DataSource is defined
Hi,
I have an application that I have been deoploying to ear/ejb-jar/war files for some time. But I have found when I added a DataSource for CMP entity beans deployment of the ejb-jar failes with the following error;
WARNING: Skipping deployment step with id 'packaging-sequence' because no concrete deployer was found for platform 'JDBC'
If I remove the data source the deployment works, so it does seem to be the data source not the CMP entity bean that causes the problem.
Does anyone know what this error means and how to fix it!!!
Paul
What does the manual for the OC4J application server have to say about it all?
Similar Messages
-
ViewController to call deployed EJB JAR on WLS
Hi,
I have Model project containing EJB deployed into WLS as EJB JAR file.
I need to create another application for the View and reference the deployed EJB JAR.
The idea is to call remote EJB without having and any project dependencies.
Can you please advice on how it can be done.
Thank you in advance
EmileHi Frank,
The Model is only EJB.
The View only contains ADF Faces (no bindings , no page def , no datacontrol).
Please consider it as urgent
Thank you for your reply
Edited by: ebitar on Oct 12, 2011 9:46 AM -
Why i canot deploy cd.jar when using JBoss on linux
Hi,friends
I have successfully deploy the interest.jar on my linux box.But when deploying cd.jar it tells me that "Could not deploy file:/usr/local/JBoss-2.4.3_Tomcat-3.2.3/jboss/tmp/deploy/Default/cd.jar,
Cause:org.jboss.ejb.DeploymentException: Bean com.web_tomorrow.cd.CDBean not found within this application."
The source directory is described as below:
src
|_com
| |_web_tomorrow
| |_cd
| | (CD.class,CDBean.class,CDHome.class,
| | CDCollection.class,
| | CDCollectionBean.class,
| | CDCollectionHome.class,
| | CDExistsException.class)
| |_jspcd
| |_utils()
|_MATA-INF
| (ejb-jar.xml,jboss.xml)
|_WEB_INF
On src directory
#jar -cvf cd.jar com/web_tomorrow/cd/*.class \
com/web_tomorrow/utils/*.class META-INF/
When i cp the cd.jar to deploy directory jboss automatically begin deploying the cd.jar and echo the above message and stop deploying.
Here is my configuration file:
[ejb-jar.xml]
<?xml version="1.0" encoding="Cp1252"?>
<ejb-jar>
<display-name>MusicCDs</display-name>
<enterprise-beans>
<entity>
<description>Models a music CD</description>
<ejb-name>CDBean</ejb-name>
<home>com.web_tomorrow.cd.CDHome</home>
<remote>com.web_tomorrow.cd.CD</remote>
<ejb-class>com.web_tomorrow.cd.CDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>title</field-name></cmp-field>
<cmp-field><field-name>artist</field-name></cmp-field>
<cmp-field><field-name>type</field-name></cmp-field>
<cmp-field><field-name>notes</field-name></cmp-field>
<primkey-field>id</primkey-field>
</entity>
<session>
<description>Models a music CD collection</description>
<ejb-name>CDCollectionBean</ejb-name>
<home>com.web_tomorrow.cd.CDCollectionHome</home>
<remote>com.web_tomorrow.cd.CDCollection</remote>
<ejb-class>com.web_tomorrow.cd.CDCollectionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/CD</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.web_tomorrow.cd.CDHome</home>
<remote>com.web_tomorrow.cd.CD</remote>
<ejb-link>com.web_tomorrow.cd.CDBean</ejb-link>
</ejb-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>CDBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
[jboss.xml]
<?xml version="1.0" encoding="Cp1252"?>
<jboss>
<secure>false</secure>
<container-configurations />
<resource-managers />
<enterprise-beans>
<session>
<ejb-name>CDCollectionBean</ejb-name>
<jndi-name>cd/CDCollection</jndi-name>
<configuration-name></configuration-name>
</session>
<entity>
<ejb-name>CDBean</ejb-name>
<jndi-name>cd/CD</jndi-name>
<configuration-name></configuration-name>
</entity>
</enterprise-beans>
</jboss>
I am frustrated now! Any help is greatly appreciated!
Best Regards!$(jboss_home)/log/server.log told me that i should have a look at Container.java first.So i openned it and found the following code snippet:
Logger.debug("Binding an EJBReference "+ref.getName());
if (ref.getLink() != null) {
// Internal link
Logger.debug("Binding "+ref.getName()+" to internal JNDI source: "+ref.getLink());
Container refContainer = getApplication().getContainer(ref.getLink());
if (refContainer == null)
throw new DeploymentException ("Bean "+ref.getLink()+" not found within this application.");
OK,the DeploymentException is thrown because the refContainer is null.
Have a look at getContainer method below:
public Container getContainer(String name)
return (Container)containers.get(name);
where,
containers is a HashMap which holds the mapping between ejbName and container.So the reason is the jboss cannot find corresponding container from the given parameter - name.Its value is ref.getLink()'s return value,com.web_tomorrow.cd.CDBean.
open the ejb-jar.xml,i found link is defined as below:
<ejb-ref>
<ejb-ref-name>ejb/CD</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.web_tomorrow.cd.CDHome</home>
<remote>com.web_tomorrow.cd.CD</remote>
<ejb-link>com.web_tomorrow.cd.CDBean</ejb-link> <- wrong
</ejb-ref>
After i changed it to <ejb-link>CDBean</ejb-link> the jboss can deploy cd.jar normally.
The problem itself isnot complicate but it demonstrated that the open source is good for you to fix the bug up!
BTW,in order to making it easy to fix the bug, the jboss binay version is built with debug infomation.So you can rebuid it without any debug infomation.
<target name="compile" depends="prepare">
<mkdir dir="${build.classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${build.classes.dir}"
debug="on" <- change it to "off"
deprecation="off"
optimize="on"
includes="org/**"
excludes="**/activation/**, **/*BeanInfo.java"
>
<classpath refid="classpath"/>
</javac>
</target>
Thanks for all your help! -
Unable to deploy ejb jar consisting CMP and Stateful in single ejb-jar.xml
Hi
I was able to deploy entity bean and stateless bean saperately but when i am trying to deploy a jar consisting of CMP entity and Stateless within single ejb-jar.xml it shows following errors.
Auto-deploying ejb_SDCurrency.jar (No previous deployment found)... ISDCMCurrencyHome_EntityHomeWrapper4.java:830: 'finally'
wi
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:835: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:838: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:889: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:893: 'try' without 'catch' or 'finally'.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findByCode(int argument0, java.lang.String argument1) throws
javax.ej
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:893: Statement expected.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findByCode(int argument0, java.lang.String argument1) throws
javax.ej
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:961: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:966: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:968: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1017: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1021: 'try' without 'catch' or 'finally'.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findAllByCode(int argument0, java.lang.String argument1) throws
javax
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1021: Statement expected.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findAllByCode(int argument0, java.lang.String argument1) throws
javax
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1371: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1376: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1378: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1427: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1431: 'try' without 'catch' or 'finally'.
public java.util.Enumeration findAuthorizedRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1431: Statement expected.
public java.util.Enumeration findAuthorizedRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1496: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1501: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1504: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1555: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1559: 'try' without 'catch' or 'finally'.
public java.util.Enumeration findAllRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1559: Statement expected.
public java.util.Enumeration findAllRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1624: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1629: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1632: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1683: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1685: 'try' without 'catch' or 'finally'.
public ISDCMCurrencyHome_EntityHomeWrapper4() throws java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1685: Statement expected.
public ISDCMCurrencyHome_EntityHomeWrapper4() throws java.rmi.RemoteException
^
30 errors
Error compiling C:\oc4jext\j2ee\home\applications\calm6/ejb_SDCurrency.jar: Syntax error in source
com.evermind.compiler.CompilationException: Syntax error in source
at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:90)
at java.security.AccessController.doPrivileged(Native Method)
at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:19)
at com.evermind.compiler.Javac.compile(Javac.java:37)
at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:335)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:256)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplication
Installation.java:439)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
Note:The same jar is deployed into Weblogic 5.1 and was working fine .....
so please if any solutions .....
regards,
SapHi sapthapathi,
From the information u have provided, i can only guess, that
the problem is in ur code...Not in ejb-jar.xml....
'coz there is no problem in combining stateless session bean and CMP entity bean information in a single ejb-jar.xml file...i myself have deployed bunch of CMPs with stateless session beans..
So please check ur code once again....
--Venky -
[b]I was just wondering why ejb jar files cannot be deployed using OEM.
This feature is supported by many other app servers.Did you ever deployed this EJB from weblogic console?
Thanks,
Rahul
"Chris" <[email protected]> wrote:
Hi, all
I am using WLS 7.0 ,there are some ejb-jar files in a application
directory:
user_projects\mydomain\application
when I put new ejb-jar files to overwrite the old ones, it seemed that
WLS
still using the old ones, though WLS said "ejb activate complete".
then I delete some temp files . restart the server, it still does not
work
out .
I am sure that I'v set the ProductionModeEnalbed=false.
and at another machine with the same envirenment , it is all OK.
What I$B!!(Bwant to know is where WLS 7 put the jar files , or .class
file that
it
is really and corrently using. Could some one help me ?
Thanks in advance. -
Deployed EJB.jar has some classes with zero bytes
Has anyone hit a situation where Windows Jdev 902 puts class files into the ....EJB.jar file with zero bytes? In my case, the eight zero length classes are: seven My...Row.class files and the MyApplicationModule.class file. They all are in the /mypackage/common/ package and are in the ...classes/mypackage/common/ file folder.
I can use PKZIP to delete the zero length classes and add them back into the .jar and everything works as expected.
There are no error messages generated during the deployment that creates the .jar file that has the problem.This was posted on another thread by jdev team...
We have been following this issue in support TAR 2274825.996. I sent some technical detail to the support rep on July 10, but it looks like that information never got added to the TAR. Well, FWIW, here it is:
The user may be running out of open files. The
stdio library which underlies Win32 programs (like the JVM) has a
limit on the number of files that can be open concurrently. The
limit is around 2000-2100 open files (I tested this on NT, 2000, and
XP), and the limit is on a per-process basis. If the user is running
into this limit because JDev has too many open files, then the utility
methods we use to open JAR files or other streams could be receiving
a java.io.FileNotFoundException exception with the message "Too many
open files". To verify this: go to the Windows Task Manager, go to
View | Select Columns... and be sure the "Handle Count" checkbox is
checked. Does the jdev.exe process have a disproportionately higher
number of handles than other processes? If the Handle Count is above
2000 (approx), JDev might be running out of open files. (I say "might" because
the Handle Count is for many different kinds of Win32 kernel objects,
not just for file handles.) If the Handle Count is the problem, then
it would explain the transient, nondeterministic behavior that the
user is reporting. Because the Handle limit is per-process, it would
explain why the user is able to use PKZIP or WinZip to repair the JAR
file. Try closing editors before deploying and see if that helps.
If the user confirms that the Handle Count is excessive, then we may
have a Handle leak of some kind in the product that will need to be
fixed.
Also try running JDev using "jdev -hotspot" on the command line instead
of just "jdev" and see if the behavior changes.
Hope that helps. We are monitoring the TAR, but no one has been able to reproduce the problem you are reporting, even with the files attached to the TAR, and yours is the only report so far that we've received about this specific problem.
I have added several more entities and views into app module. As I added each one, the list of zero byte jar classes would change, but always about 7-8 bad ones. Now that I am no longer adding new entities/views, the problem has become stable and repeatable. The same classes ALWAYS show up with zero bytes.
I monitored jdevw.exe while doing the deploy, and the number of handles never went above 675. I ran with jdevw.exe -hotspot and the results were exactly the same.
thanks,
Roger -
How to deploy EJB jar file in Weblogic 8.1
Hi,
I have created the EJB jar file, bearing home,remote,ejb and client class aling with the META-INF folder containing ejb-jar.xml and weblogic-ejb-jar.xml.
After all this I am confused where to put this EJB jar file so that the container could deploy it.
I am putting it in application folder of my own created Domain.
Suggest me...Put it anywhere you like. You can always deploy it using the administrator console. There usually is an auto-deployment directory for the domain. You could find all that information in the Weblogic documentation.
-
Error deploying EJB.jar 40k via console.
Hi,
I have an ejb.jar thats over 40k, containing std_ejb.jar (non ejb-compiled jar) that I am trying to load into WLS6.1 via the console. I copied the file into <wls.home>/../applications dir and when I try to load this file via the console, the console tries to load the file to generate the stubs and skeletons. The process to upload fails after a about 10 secs with a "Read timed out" error and I can see the file I copied to the apps dir, which was originally 45k is now 40k.. Please note that I have an eval version of WLS6.1. Dont know if that impacts uploads ?
thanx
-RamHi,
I have an ejb.jar thats over 40k, containing std_ejb.jar (non ejb-compiled jar) that I am trying to load into WLS6.1 via the console. I copied the file into <wls.home>/../applications dir and when I try to load this file via the console, the console tries to load the file to generate the stubs and skeletons. The process to upload fails after a about 10 secs with a "Read timed out" error and I can see the file I copied to the apps dir, which was originally 45k is now 40k.. Please note that I have an eval version of WLS6.1. Dont know if that impacts uploads ?
thanx
-Ram -
Deploying EJB JAR and Application EAR, META-INF directory name
To all:
I had a problem the last couple of days with deploying an EJB and application.
I'm new to WebLogic, maybe this is common knowledge, but I researched it and
didn't find any reference to what I discovered.
I'm using WebLogic Server 7 Service Pack 2 (7.02), on Windows 2000.
My problem was that the application that I was trying to deploy would not deploy
successfully, because a dependent class was not found for the EJB. I tried everything,
but the only thing I could get to work was placing the dependent jar files in
the classpath of the WebLogic server, within the start script. I correctly had
the Class-Path manifest line correct, but the dependent classes were not being
found.
Through trial and error I discovered that the META-INF directory within the JAR
and EAR archives HAS TO BE ALL UPPERCASE for the app server to successfully find
the manifest.mf file and the application.xml file.
As soon as I changed the directory name in both the EJB JAR file and the application
EAR file, the EJB deployed successfully, all dependent classes were then found.
I'm posting this here to help anybody that might have the same problem. There
is not any documentation that I could find that had this directory name requirement
explicitly stated.
Regards,
JDWhat does the manual for the OC4J application server have to say about it all?
-
Error at the time of Deploying EJB jar on JBoss
Hi:
I am going to create web service using EJB3.0.
But at the time deploying file on JBOss i am getting following error:
12:22:51,856 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:175)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:544)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)
at org.jboss.ws.metadata.wsdl.WSDLUtils.getTypeNamespace(WSDLUtils.java:700)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.processWebService(JAXWSWebServiceMetaDataBuilder.java:313)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:107)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:76)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:70)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:144)
at org.jboss.wsf.container.jboss50.BareWSFRuntime.start(BareWSFRuntime.java:66)
at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHookEJB.deploy(AbstractDeployerHookEJB.java:48)
at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:115)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
... 18 more
12:22:51,897 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** CONTEXTS IN ERROR: Name -> Error
vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar -> java.lang.StringIndexOutOfBoundsException: String index out of range: -1So, can any body tell me the solution of this problem?
Thank You.AnupDesai wrote:
Hi:
After adding require packages also i am getting the same error.
Well, if it's not a version problem with either the JDK (installing java 6 on top of a java 5 distribution) or the Jars (like JAXB) , then , as pointed out, you might have written your Web service using a packageless class:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)Restart a new project in your IDE with a packaged ws from the start, and see if it works. -
Deploying persistence.xml in ejb-jar componts
Hi,
If you are deploying ejb-jar components which are packaged independently and are remote components but they all access the same database, do you put the persistence.xml in the META-INF of each component (ejb-jar). If not, where would it go?
I can find lots of references to having a single persistence.xml with many configurations but if (theoretically) each bean is deployed on a separate JVM/Container how would it access the persistence.xml?
Thanks.If you are deploying the EJB JARs to different Java EE servers, then yes, each EJB JAR needs its own persistence.xml. You would configure each Java EE server to point to the same JDBC resource.
If you are deploying them all to the same server, you should package the entity classes into a single JAR file, and include that JAR file in an EAR with the other EJB JARs. In that scenario, persistence.xml is in the JAR's META-INF directory. The JAR file can either be in the top-level of the EAR, or in the EAR's library directory. In this case, the scope of the persistence unit is the entire EAR.
-ian -
Classloading [EAR] - [webapp.war+ejb.jar]
Hi.
I've got a problem with the classloader hierarchy in WL 6.0.
When I deploy my war/ejb application as an EAR, everything works fine.
But I want (for several reasons) to deploy
EJB jars and WebApp wars (or exploded Web Apps) seperately.
WL 6.0 EJB classloader doesn't export remote/home interfaces and
helper classes,
so my web app can't find them.
When I include that interfaces/classes in my Web App, I get
occasionally ClassCastExceptions (I assume depending on classloader
caching).
Is there a way to configure the classloader hierarchy, or do you have
any other solution for this?
Thanks,
RomanHello,
I have a big application to do.
So, one solution should be to use an EAR for one
module, containing the WAR for the web-tier and the
EJB-JAR for the business-tier.
It would be better doing like this than creating a
big WAR, in order to avoid to deploy a big WAR when a
modification is done in one module.Are you using local EJBs or remote EJBs? The only way for a war to talk to a local EJB is to package the war along with the ejb-jar in an EAR file because they need to be collocated. You can not simply bundle EJB classes in a war file.
If you are using remte EJBs, then you can package the EJB client view classes along with the servlets and JSPs in the war file and deploy the war separately. But again your war will be one big war.
If your EJBs are just entity beans, then Java EE 5 (see http://weblogs.java.net/blog/ss141213/archive/2005/12/using_java_pers.html) allows you some nice options.
>
What about the problem of the session ?
In fact, I have to declare a context-root for one
EAR.
And at each context-root is created an object
HttpSession on the server.
So, I have some questions about this :
- How can I configure my WARs in order to use only
one HttpSession object for every WARs ?
There is no standard way to do this. Relying on any application server specific feature can only make your app non-portable. So I strongly recommend you not to do this.
- Can I put multiple WARs in one EAR ?Of course you can.
If yes, what about the context-root ? This solution would resolve
the session problem.Can't be solved using any standard way. So I suggest you stick to one big war, if that's what your business requirement is.To speed up development-deployment-test cycle, any appserver allows a rapid deployment option where in you can deploy incremental changes to server. Use this facility during development. DON'T sacrifice portability of your app by using any product specific configuration that you may not find any where else.
Thanks,
Sahoo -
The server deploy EJB but I run EJB Client program,The error msg is can't find JNDI
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you.Sabha:
Thank you for your help info, I soloved the problem.
The problem is the ejb jar was deleted(I don't why)
then System Admin to deploy EJB jar from Admin console.
After that everything is fine.
"Sabha" <[email protected]> wrote:
Run weblogic.Admin -url ... LIST to see whether the JNDI name is there
. or
you can view the jndi tree of the server from the console (right click
on
server name) and check whether the ejb home is bound to the correct jndi
name.
-Sabha
"Matthew Shinn" <[email protected]> wrote in message
news:[email protected]..
Hi Albert,
I would double check to make sure the EJB was indeed deployed (check
server log). What message did you see that leads you to believe itwas
successfully deployed? Also, verify the JNDI name you are lookingup in
your client matches the JNDI name for the EJB. If this doesn't solve
the problem, please post the error message and stack trace you are
seeing on the client.
- Matt
Albert Pi wrote:
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you. -
I use Jbuilder5 and Borland Appserver.I created Bean Managed by EJB Modeler and Created EJBTestclient.
when i run my Bean or EJBTestClient have a message :
Could not deploy ejb-jar ' ../. .. ./ A.jar org.omg.CORBA.OBJECT_NOT_EXIST .
or
Could not locate the following Object:
repository id : IDL:inprise.com/ejbutil/management/Manager_v4_5:1.0
object name : EJB/Manager[ejbcontainer] ".
How i to do ?I have the same problem - did you solve this?
-
Hi,
When I try to deploy EJB.jar, I have an error :
java.lang.InstantiationException: Error initializing ejb-module; Exception Error in application ejbGestionBase: Error loading package at file:/C:/jdev904/j2ee/home/applications/ejbGestionBase/ejbGestionBase.jar,
Error compiling C:\jdev904\j2ee\home\applications\ejbGestionBase\ejbGestionBase.jar: Syntax error in source
at com.evermind.server.ejb.EJBContainer.throwInstantiationException(EJBContainer.java:2428)
at com.evermind.server.ejb.EJBContainer.postInitBatch(EJBContainer.java:2412)
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:2195)
at com.evermind.server.Application.postInit(Application.java:553)
at com.evermind.server.Application.setConfig(Application.java:170)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1927)
at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:407)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:127)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:73)
at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:378)
at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:278)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Unknown Source)
Can you help me please?If you are deploying from JDev, run EJB verifier before deploying.
Select ejb-jar.xml in the navigator, right mouse and choose Verify Enterprise JavaBeans.
raghu
JDev Team
Maybe you are looking for
-
Enabling Time Maachine to back-up more than one drive
My 1TB Time Machine is setup as my Ethernet hub and it backs up my main drive flawlessly. I am not using the Airport feature. I need Time Machine to back up a second internal drive which contains all of my pictures and tunes. Apple Support could not
-
Connecting Equium A100 to a TV
I have an Equium A100-147 and a TV (Type is KV28FX). I wanted to connect the A100 to the lap tpo to view some pictures. I have tried connecting with a S to S lead, and a S to scart lead, neither of which work. Can anyone suggest an answer?
-
HT201441 how do i tell if my iphone is linked to an ipad?
how do i tell if my iphone is linked to an ipad
-
Something odd is happening in my iTunes! I took advantage of the 12 Days of Christmas offer and downloaded Season 1 The Rock and House. I also downloaded Top Gear Special and The Trip. Now, all I want to do is have The Trip on my iPhone 4. So, I clic
-
EPAgent in CRM 5. is not visible in SMD
Hello, I have connected a CRM 5.0 in my solman with the CRM server and CRM java components (CRM java associated to a JAVA system). When i run setup wizard in http://xxxxx.xx.xx:xxx/smd -> diagnostics setup->managed systems->setup wizard the manage