[Installation, Configuration & DEPLOYMENT] - EAR Deployment failed with JBoss 4.2.3 and Mysql
by agusmag
Hi there!
We are running a JBoss 4.2.3.GA, MySQL version 5.0.67-0ubuntu6, Ubuntu server 8 and Java 1.6.0.
We have developed a Seam 2.1.1 project on Windows by using Eclipse Europa and the JBossTools and everything works fine, since we are able to use Eclipse to publish to JBoss 4.2.3 and to run the app.
Now we are trying to publish the web application on Linux by copying the deployed ear directory and the datasouce from the Jboss running on Windows (this approach works fine on Windows).
Unfortunately the deployment fails as you can see below.
The same deployment works in Windows XP with the same configuration.
I've tested the MySQL datasource by using a jsp which looks up at the datasource on Linux and I'am able to read the database
metadata. So I' don't know why the deployment fails.
On startup the server says that:
| 15:12:58,220 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 15:12:58,285 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=soccorsoDatasource' to JNDI name 'java:soccorsoDatasource'
|
| ...
|
| 15:12:59,749 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
| 15:12:59,752 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso with dependencies:
| 15:12:59,752 INFO [JmxKernelAbstraction] jboss.jca:name=soccorsoDatasource,service=DataSourceBinding
| 15:12:59,753 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
|
| ...
|
| 15:13:00,164 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Contact
| 15:13:00,165 INFO [Ejb3Configuration] found EJB3 @Embeddable: org.hcilab.soccorso.entity.RelativeId
| 15:13:00,171 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Mentalfunction
| 15:13:00,178 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Pain
| 15:13:00,179 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Systemuser
| 15:13:00,180 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Relative
| 15:13:00,181 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Diagnosis
| 15:13:00,184 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.User
| 15:13:00,186 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Bodyfunction
| 15:13:00,188 INFO [Ejb3Configuration] found EJB3 @Embeddable: org.hcilab.soccorso.entity.DiagnosisId
| 15:13:00,190 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Joint
| 15:13:00,193 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Involuntary
| 15:13:00,200 INFO [Ejb3Configuration] found EJB3 Entity bean: org.hcilab.soccorso.entity.Motor
| 15:13:00,262 INFO [Configuration] Reading mappings from resource : META-INF/orm.xml
| 15:13:00,264 INFO [Ejb3Configuration] [PersistenceUnit: soccorso] no META-INF/orm.xml found
| 15:13:00,313 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Contact
| 15:13:00,347 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Contact on table contact
| 15:13:00,415 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Mentalfunction
| 15:13:00,415 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Mentalfunction on table mentalfunction
| 15:13:00,432 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Pain
| 15:13:00,433 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Pain on table pain
| 15:13:00,463 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Systemuser
| 15:13:00,463 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Systemuser on table systemuser
| 15:13:00,470 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Relative
| 15:13:00,470 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Relative on table relative
| 15:13:00,479 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Diagnosis
| 15:13:00,479 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Diagnosis on table diagnosis
| 15:13:00,483 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.User
| 15:13:00,483 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.User on table user
| 15:13:00,517 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Bodyfunction
| 15:13:00,517 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Bodyfunction on table bodyfunction
| 15:13:00,526 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Joint
| 15:13:00,526 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Joint on table joint
| 15:13:00,536 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Involuntary
| 15:13:00,536 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Involuntary on table involuntary
| 15:13:00,550 INFO [AnnotationBinder] Binding entity from annotated class: org.hcilab.soccorso.entity.Motor
| 15:13:00,550 INFO [EntityBinder] Bind entity org.hcilab.soccorso.entity.Motor on table motor
| 15:13:00,625 INFO [CollectionBinder] Mapping collection: org.hcilab.soccorso.entity.User.contactsForSsn -> contact
| 15:13:00,626 INFO [CollectionBinder] Mapping collection: org.hcilab.soccorso.entity.User.diagnoses -> diagnosis
| 15:13:00,628 WARN [ServiceController] Problem starting service persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
| java.lang.NullPointerException
| at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
| at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
|
| .....
|
| --- MBeans waiting for other MBeans ---
| ObjectName: persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
| State: FAILED
| Reason: java.lang.NullPointerException
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=soccorsoDatasource
| Depends On Me:
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=GenerateDataAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=MedicalFieldsAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=UserListAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=AuthenticatorAction,service=EJB3
|
| ObjectName: jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=GenerateDataAction,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
|
| ObjectName: jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=MedicalFieldsAction,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
|
| ObjectName: jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=UserListAction,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
|
| ObjectName: jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=AuthenticatorAction,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,unitName=soccorso
| State: FAILED
| Reason: java.lang.NullPointerException
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=soccorsoDatasource
| Depends On Me:
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=GenerateDataAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=MedicalFieldsAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=UserListAction,service=EJB3
| jboss.j2ee:ear=soccorso-ear.ear,jar=soccorso-ejb.jar,name=AuthenticatorAction,service=EJB3
|
this is the soccorso-ds.xml datasource
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE datasources
| PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
|
| <datasources>
|
| <local-tx-datasource>
| <jndi-name>soccorsoDatasource</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/soccorso</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>root</user-name>
| <password>di*****e</password>
| <!--
| <exception-sorter-class-name>
| org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
| </exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| -->
| </local-tx-datasource>
|
| </datasources>
|
persistence.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- Persistence deployment descriptor for dev 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="soccorso">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/soccorsoDatasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/soccorsoEntityManagerFactory"/>
| </properties>
| </persistence-unit>
|
| </persistence>
|
application.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <application xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
| version="5">
|
| <display-name>soccorso-ear</display-name>
|
|
| <!-- <module><java>soccorso-ds.xml</java></module>
| -->
|
| <module>
| <web>
| <web-uri>soccorso.war</web-uri>
| <context-root>/soccorso</context-root>
| </web>
| </module>
|
| <module>
| <ejb>soccorso-ejb.jar</ejb>
| </module>
|
| </application>
|
|
ejb-jar.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
| version="3.0">
|
| <interceptors>
| <interceptor>
| <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
| </interceptor>
| </interceptors>
|
| <assembly-descriptor>
| <interceptor-binding>
| <ejb-name>*</ejb-name>
| <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
| </interceptor-binding>
| </assembly-descriptor>
|
| </ejb-jar>
|
the Ear is an exploded directory with the following organization.
|
| |-
| |-META-INF (application.xml jboss-app.xml)
| |-soccorso-ejb.jar
| |---META-INF (ejb-jar.xml persistence.xml ...)
| |---org
| |-----hcilab
| |-------soccorso
| |---------action
| |---------entity
| |---------session
| |---------util
| |---------webservice
| |-soccorso.war
| |---img
| |---js
| |---layout
| |---META-INF
| |---stylesheet
| |---WEB-INF
| |-----classes
| |-------META-INF
| |-----lib
|
|
Do you have any ideas why the deployment fails? I've also tried to hot deploy the datasource or the ear with no luck: the errior is always the same...NullPointer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205903#4205903
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205903
15 years, 11 months
[Remoting] - Remoting2 - MC bean for SSL Connector
by jaikiran
Could someone please point me to some document where i can find a MC bean configuration for setting up a SSL connector equivalent to this MBean configuration:
<?xml version="1.0" encoding="UTF-8"?>
|
| <server>
| <!-- The server socket factory mbean to be used as attribute to socket invoker -->
| <!-- which uses the JaasSecurityDomain -->
| <mbean code="org.jboss.remoting.security.domain.DomainServerSocketFactoryService"
| name="jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced"
| display-name="SecurityDomain Server Socket Factory">
| <attribute name="SecurityDomain">java:/jaas/SSLAdvanced</attribute>
| <depends>jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced</depends>
| </mbean>
|
| <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
| name="jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced">
| <!-- This must correlate with the java:/jaas/SSL above -->
| <constructor>
| <arg type="java.lang.String" value="SSLAdvanced"/>
| </constructor>
| <!-- The location of the keystore
| resource: loads from the classloaders conf/ is the first classloader -->
| <attribute name="KeyStoreURL">localhost.keystore</attribute>
| <attribute name="KeyStorePass">opensource</attribute>
| </mbean>
|
| <!-- The Connector is the core component of the remoting server service. -->
| <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
| <!-- data marshalling, etc.) with the invocation handlers. -->
| <mbean code="org.jboss.remoting.transport.Connector"
|
| name="jboss.remoting:type=Connector,transport=socket3843,handler=ejb3">
| display-name="Socket transport Connector">
|
| <attribute name="Configuration">
| <config>
| <invoker transport="sslsocket">
| <attribute name="dataType" isParam="true">invocation</attribute>
| <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
| <!-- The following is for setting the server socket factory. If want ssl support -->
| <!-- use a server socket factory that supports ssl. The only requirement is that -->
| <!-- the server socket factory value must be an ObjectName, meaning the -->
| <!-- server socket factory implementation must be a MBean and also -->
| <!-- MUST implement the org.jboss.remoting.security.ServerSocketFactoryMBean interface. -->
| <attribute name="serverSocketFactory">jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">3843</attribute>
| </invoker>
| <handlers>
| <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
| </handlers>
| </config>
| </attribute>
| <depends>jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</depends>
|
| </mbean>
|
| </server>
|
Note that this works fine, but since most of the configurations AS5 have now moved to MC Bean, i was hoping to do the same for this configuration (which is being used in one of EJB3 examples).
I guess, its mainly on the lines of this:
<bean name="org.jboss.ejb3.RemotingConnector"
| class="org.jboss.remoting.transport.Connector">
|
| <property name="invokerLocator">
|
| <value-factory bean="ServiceBindingManager"
| method="getStringBinding">
| <parameter>
| jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
| </parameter>
| <parameter>
| <null />
| </parameter>
| <parameter>socket://${jboss.bind.address}:${port}</parameter>
| <parameter>
| <null />
| </parameter>
| <parameter>3873</parameter>
| </value-factory>
|
| </property>
| <property name="serverConfiguration">
| <inject bean="ServerConfiguration" />
| </property>
| </bean>
|
| <!-- Remoting Server Configuration -->
| <bean name="ServerConfiguration"
| class="org.jboss.remoting.ServerConfiguration">
| <property name="invocationHandlers">
| <map keyClass="java.lang.String" valueClass="java.lang.String">
| <entry>
| <key>AOP</key>
| <value>
| org.jboss.aspects.remoting.AOPRemotingInvocationHandler
| </value>
| </entry>
| </map>
| </property>
| </bean>
But the missing part is, the passing of keystore url and password to the bean. I looked at the org.jboss.remoting.ServerConfiguration which says this:
anonymous wrote : For an example of the use of ServerConfiguration with the microcontainer, see the org.jboss.test.remoting.configuration package in the testsuite directory of the JBoss Application Server 5.0.0.
But i don't see any test cases with that package in the AS5 testsuite. Maybe they have moved?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205885#4205885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205885
15 years, 11 months
[Tomcat, HTTPD, Servlets & JSP] - upload file portlet on jboss...help
by raffaele.letizia
HI,
i'm a new. I want to create a portlet that upload file... i have found a simpleupload.jsp with usebeans but i have problme because i can search the file but don't upload.
the text is:
<%@ page language="java" import="javazoom.upload.*,java.util.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
<jsp:setProperty name="upBean" property="folderstore" value="Users/raffaele/Uploads"/>
</jsp:useBean>
<%
if (MultipartFormDataRequest.isMultipartFormData(request))
{
// Uses MultipartFormDataRequest to parse the HTTP request.
MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
String todo = null;
if (mrequest != null) todo = mrequest.getParameter("todo");
if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
{
Hashtable files = mrequest.getFiles();
if ( (files != null) && (!files.isEmpty()) )
{
UploadFile file = (UploadFile) files.get("uploadfile");
if (file != null) out.println("Form field : uploadfile"+" Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+" Content Type : "+file.getContentType());
// Uses the bean now to store specified by jsp:setProperty at the top.
upBean.store(mrequest, "uploadfile");
}
else
{
out.println("No uploaded files");
}
}
else out.println(" todo="+todo);
}
%>
Select a file to upload :
HTML tags used in this form :
<form
method="post"
action="add.jsp"
name="upload" enctype="multipart/form-data">
<input
type="file"
name="uploadfile"
size="50">
Copyright
© JavaZOOM 1999-2006
Where is the problem? Can we help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205823#4205823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205823
15 years, 11 months