[JBossWS] - Re: Deployment failure
by whitexos12
"kk1107" wrote : Please let me know how did you solve this problem. I am facing similar problem. thanks
|
| ~Samy
I too am getting the same error can someone please tell how to solve this issue it's very important any help is appreciated.
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
| IllegalAnnotationExceptions
| java.util.List is an interface, and JAXB can't handle interfaces.
| this problem is related to the following location:
| at java.util.List
| java.util.List does not have a no-arg default constructor.
| this problem is related to the following location:
| at java.util.List
|
| at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
| (IllegalAnnotationsException.java:102)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139865#4139865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139865
16 years, 9 months
[Persistence, JBoss/CMP, Hibernate, Database] - Problem accesing JPA EntityManager from JSP
by ensoreus
Hy,
I am trying to access an EntityManager from JSP scriptlet for testing purposes and it doesn't work.
Here is the JSP scriptlet:
<%
EntityManager em = (EntityManager) (new InitialContext()).lookup("java:comp/env/persistence/em");
Query query = em.createQuery("select u from USER u");
List users = (List) query.getResultList();
for (User user : users) { user.toString(); }
%>
persistence.xml file :
........
<persistence-unit name="myApp">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>java:/XAOracleDS</jta-data-source>
</persistence-unit>
......
web.xml file :
.......
<persistence-context-ref>
<persistence-context-ref-name>persistence/em</persistence-context-ref-name>
<persistence-unit-name>myApp</persistence-unit-name>
</persistence-context-ref>
.......
The application is deployed in JBoss 4.2.2.GA. When I access the JSP page I get the following exception:
javax.servlet.ServletException: javax.naming.NameNotFoundException: persistence not bound
I guess I have to configure the resource in jboss-web.xml too, but I don't know how. I tried with <resource-ref>, but I got the same error.
Any help at all would be highly appreciated !
Thanks.
Andrei
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139854#4139854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139854
16 years, 9 months
[JBossWS] - How to create a Web Service in JBoss
by whitexos12
Hi,
I am new to JBoss and mostly work with BEA and Oracle AS. I just downloaded jboss-4.2.2.GA. Now how do I deploy a Web Service are there any special kinds to create an ear for a Web Service. As I just have a simple HelloWorld program that I need to expose it as a Web Service and deploy it on JBoss but don't know what commands do I need to create a Web Service ear out of it and how to deploy it on the server.
Can someone please provide a simple example step by step to build and deploy a Web Service in JBoss.
As in oracle I can use the following to build an ear for a Web Service
<target name="assemble-webservice" depends="setup">
| <echo message="-----> Assembling the service ear file." />
| <copy todir="${out.dir}/war/WEB-INF/lib">
| <fileset dir="${out.lib}">
| <include name="*.jar"/>
| </fileset>
| </copy>
| <oracle:topDownAssemble appName="${app.name}"
| wsdl="${wsdl.file}" className="${implementaion.class}"
| input="${bld.webservice.dir}" output="${out.dir}"
| ear="${lib.dir}/${app.name}_service.ear">
| <!--fileset refid="resources" /-->
| </oracle:topDownAssemble>
| </target>
and in BEA can use the following:
<servicegen
| destEar="${build}"
| warName="helloWorldService.war">
| <service
| javaClassComponents="com.xx.ab.webservice.helloWorldWebservice"
| targetNamespace="http://xmlns.xx.com/ab/helloWorldService"
| serviceName="HelloWorldService"
| serviceURI="/helloWorldService"
| style="document"
| protocol="http"
| expandMethods="True">
| <handlerChain name="ExpressChain" handlers="com.xx.ab.handler.SOAPHandler"/>
| </service>
| <classpath>
| <pathelement path="${classes}"/>
| <pathelement path="${lib}/dynamic/*.jar"/>
| </classpath>
| </servicegen>
Now how do I do it in JBoss. What commands to use to create an ear for a Web Service. Any small tutorial will really help alot. Any help is really appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139846#4139846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139846
16 years, 9 months