[Beginners Corner] - JBoss in NetBeans on Ubuntu
by dmcquay
I just installed NetBeans and JBoss. However, JBossAS won't start. Here is the output. It appears that it can't start because it can't find "jboss-service.xml". However, I checked and the file is there. Does anyone have an idea why it won't start?
Output:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/local/jboss-4.0.5.GA
JAVA: /usr/lib/jvm/java-6-sun/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -server -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttp.nonProxyHosts="localhost|127.0.0.1|mcquayd-laptop" -Dhttps.proxyHost= -Dhttps.proxyPort=
CLASSPATH: /usr/local/jboss-4.0.5.GA/bin/run.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar
=========================================================================
14:49:59,747 INFO [Server] Starting JBoss (MX MicroKernel)...
14:49:59,749 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
14:49:59,750 INFO [Server] Home Dir: /usr/local/jboss-4.0.5.GA
14:49:59,751 INFO [Server] Home URL: file:/usr/local/jboss-4.0.5.GA/
14:49:59,779 INFO [Server] Patch URL: null
14:49:59,779 INFO [Server] Server Name: default
14:49:59,780 INFO [Server] Server Home Dir: /usr/local/jboss-4.0.5.GA/server/default
14:49:59,780 INFO [Server] Server Home URL: file:/usr/local/jboss-4.0.5.GA/server/default/
14:49:59,780 INFO [Server] Server Log Dir: /usr/local/jboss-4.0.5.GA/server/default/log
14:49:59,781 INFO [Server] Server Temp Dir: /usr/local/jboss-4.0.5.GA/server/default/tmp
14:49:59,781 INFO [Server] Root Deployment Filename: jboss-service.xml
14:50:01,490 INFO [ServerInfo] Java version: 1.6.0,Sun Microsystems Inc.
14:50:01,491 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 1.6.0-b105,Sun Microsystems Inc.
14:50:01,491 INFO [ServerInfo] OS-System: Linux 2.6.20-15-generic,amd64
14:50:03,341 INFO [Server] Core system initialized
14:50:03,375 ERROR [MainDeployer] Could not make local copy for file:/usr/local/jboss-4.0.5.GA/server/default/conf/jboss-service.xml
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1793)
at org.jboss.deployment.MainDeployer.makeLocalCopy(MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:851)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:619)
14:50:03,419 ERROR [MainDeployer] Could not initialise deployment: file:/usr/local/jboss-4.0.5.GA/server/default/conf/jboss-service.xml
org.jboss.deployment.DeploymentException: Failed to find META-INF/jboss-service.xml for archive jboss-service.xml
at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:616)
at org.jboss.deployment.SARDeployer.init(SARDeployer.java:181)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:619)
14:50:03,425 INFO [Server] Runtime shutdown hook called, forceHalt: true
14:50:03,425 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
14:50:03,440 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041181#4041181
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041181
17 years, 8 months
[JBoss Seam] - EntityHome validation error (Chapter 14 example)
by jfrankman
I am just getting started with SEAM. I tried the first few examples, and got them working, so in my exuberence I decided to try out the EntityHome example in chapert 14 of the onling doc. Whenever I try to persist the Person, it fails with validation errors. What is interesting is that the validation errors cause the page to fail instead of displaying the errors in the browser like the previous examples do. The root of the problem is:
Caused by: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.Person
I cannot for the life of me figure out why validation is failing. My entity bean, entityhome, and jspx page is displayed below. Any hints on what the problem is would be appreciated. I have not idea how to troubleshoot this problem, so any help at all would be appreciated.
Entity Bean :
| @Entity
| @Table(name="persontable")
| public class Person {
| private Long id;
| private String firstName;
| private String lastName;
| //private Country nationality;
| @Id @NotNull @GeneratedValue
| public Long getId() {
| return id;
| }
| @Column(name="firstname",length = 45)
| @Length(max = 45)
| public String getFirstName() {
| return firstName;
| }
|
| @Column(name="lastname", length = 45)
| @Length(max = 45)
| public String getLastName() {
| return lastName;
| }
|
| public void setFirstName(String firstName) {
| this.firstName = firstName;
| }
|
| public void setId(Long id) {
| this.id = id;
| }
|
| public void setLastName(String lastName) {
| this.lastName = lastName;
| }
|
| }
|
EntityHome:
| @Name("personHome")
| public class PersonHome extends EntityHome<Person> {
| /**
| *
| */
| private static final long serialVersionUID = 219059304048820709L;
| @RequestParameter Long personId;
| @In EntityManager entityManager;
|
| public Object getId() { return personId; }
| public EntityManager getEntityManager() { return entityManager; }
|
| }
|
Page:
| <?xml version="1.0"?>
| <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns="http://www.w3.org/1999/xhtml"
| version="2.0">
| <jsp:output doctype-root-element="html"
| doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
| doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
| <jsp:directive.page contentType="text/html"/>
| <html>
| <head>
| <title>Register New User</title>
| </head>
| <body>
| <f:view>
| <h1>Create Person</h1>
| <h:form>
| <s:validateAll>
|
| <div>First name: <h:inputText value="#{personHome.instance.firstName}"/></div>
| <div>Last name: <h:inputText value="#{personHome.instance.lastName}"/></div>
| </s:validateAll>
| <div>
| <h:messages/>
| <h:commandButton value="Create Person" action="#{personHome.persist}"/>
| </div>
|
| </h:form>
| </f:view>
| </body>
| </html>
| </jsp:root>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041180#4041180
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041180
17 years, 8 months