Hello,
I have problems with compilation of sources and get all the time info that something is missing.
I put sources in: C:\coppercore_sources_3.1
My build.bat file looks like that:
@echo off
rem Build script for building CopperCore sources
rem $Revision: 1.6 $, $Date: 2007/03/21 15:41:17 $
setlocal
rem check if JAVA_HOME is set
if not "%JAVA_HOME%" == "" goto CHECK_JDK
echo JAVA_HOME environment variable is not set.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
echo Build is aborted...
goto SCRIPT_END
:CHECK_JDK
rem check if JAVA_HOME points to a JDK
if exist "%JAVA_HOME%\lib\tools.jar" goto END_CHECK_JDK
echo Could not locate %JAVA_HOME%\lib\tools.jar.
echo Make sure that JAVA_HOME points to a JDK and not a JRE.
echo Build is aborted...
goto SCRIPT_END
:END_CHECK_JDK
rem setup properties for running ant
rem add jboss server to ant properties
set AP=-DJBoss.home="C:\Program Files\jboss-4.0.5.GA\"
rem add java jdk to ant properties
set AP=%AP% -Djdk.home="%JAVA_HOME%"
rem add file upload library to ant properties
set AP=%AP% -Dupload.home="C:\coppercore_sources_3.1\coppercore\build\lib"
rem add Juid library to ant properties
set AP=%AP% -DJUG.home="C:\coppercore_sources_3.1\coppercore\build\lib"
ant %AP% %*
:SCRIPT_END
And my build.xml (the part I have changed)
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="C:\coppercore_sources_3.1\coppercore\build" default="rebuild" name="CopperCore Build">
<description>
This ant build file is used create the coppercore.ear, coppercore-client.jar, coppercore-common.jar and javadoc
for the CopperCore project.
</description>
<!-- These properties should be set with the -D option when calling ant -->
<property name="JBoss.home" value="C:\jboss-3.2.6"/>
<property name="upload.home" value="C:\coppercore_sources_3.1\coppercore\build"/>
<property name="JUG.home" value="C:\jug"/>
<property name="jdk.home" value="C:\j2sdk1.4.2_13"/>
<property name="deploy" value="default"/>
Do I wrote sth wrong?
I compile it normally using ant and I get
[javac] C:\coppercore_sources_3.1\coppercore\build\src\org\coppercore\public
ation\Publication.java:52: package org.apache.commons.fileupload does not exist
about 20m times.
When I tried to run build.bat I got
BUILD FAILED
C:\coppercore_sources_3.1\coppercore\build\build.xml:47: C:\Program Files\jboss-
4.0.5.GA" -Djdk.home C:\j2sdk1.4.2_13 -Dupload.home C:\coppercore_sources_3.1\co
ppercore\build\lib -DJUG.home C:\coppercore_sources_3.1\coppercore\build\lib\cli
ent not found.
Im using Windows XP
Thanks for any help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are probably missing a couple of libraries and some paths are set incorrectly. The Jboss.home should point to the root of a jboss-4.0.4.GA installation (new versions will probably work as well). The upload.home should point to the Apache upload library (see Apache commons for that). Finally the JUG.home should point to the loaction where the jug.jar can be found. It can be difficult to download the latter from the internet. If you can find this library on any of the other you might want to consider installing CCRT because all the required libraries are included in it.
Furthermore CCRT contains the compiled versions of CopperCore and is ready to run. It is even fairly simple to switch database versions without having to recompile.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for help:) The problem was with the the commons-fileupload (btw way Coppercore uses old version 1.0?). The compilation is succesfull. However I dont have a webplayer.war in my coppercore folder:/ What is wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This message is a ty[ical result of the Publication name not being correctly bound to a datasource. I don't know if you changed anything to the original CCRT setup or not but appearently the Publication has not been setup correctly. For this purpose in CCRT the following lines of XML have been added to the hsqldb-ds.xml file in the deploy directory:
<local-tx-datasource>
<jndi-name>Publication</jndi-name>
<connection-url>jdbc:hsqldb:hsql://127.0.0.1:1701</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>java</user-name>
<password>java</password>
<min-pool-size>5</min-pool-size>
<depends>jboss:service=HSQLSERVER</depends>
</local-tx-datasource>
This binds Publication to the HSQL database. If you are trying to use another database Publication will be bound to another database via a similar construct. In the sources you will find examples of such bindings for other DBMSs. See also https://sourceforge.net/forum/forum.php?thread_id=1722955&forum_id=345604
I don't know why the binding is missing in your case but I hope this helps track the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you starting from scratch there are numerous things you have to setup. Unless you have a very good reason for doing so I would advice against it. Remember that CCRT is not using a normal JBoss setup but a modified version of it. You will need to take care of things like:
- the setup of the database. Merely having a reference to the HSQL database is not sufficient. An MBean needs to be installed, the database scripts need to be placed in the correct location etc.
-JBoss 4.x has a different class loading scheme. We modified this for CCRT. You will need to do this probably as well. Altenatively you may package the libraries differently in the EAR. (the new class loading is limited to the scope of the ear if my memory serves me correctly).
- you will need to add the necessary libraries to the Jboss lib path
I probably forgot some steps. So if there is not a very good reason for doing so I would advice taking CCRT as starting point and continue from there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/CopperCoreTopic
javax.naming.NameNotFoundException: CopperCoreTopic not bound
....
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: topic/CopperCoreTopic reason: javax.naming.NameNotFoundException: CopperCoreTopic not bound
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: topic/CopperCoreTopic
, but these are only warnings so main problem is still this "Publication not bound"
I have tried to use the hsqldb-ds.xml from CCRT package but it doest help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to integrate a coppercore with our academic service-oriented so I can not use CCRT (or am I wrong? What do you suggest) I will start with the steps you have gave me and present here my progress and problems:)After all it would be good to have a full instruction how to do it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Of course I cannot be really the judge on that. But I would advice to use an external database for more production oriented tasks like MySQL. That saves you the trouble of integrating CopperCore with HSQL. The setup will be simpeler. And I agree that a description of how to setup the environment from scratch would not be bad at all. I looked up some of the notes we used when setting the environment up. Maybe this is helpful.
Setup of JBoss 4.04.GA
1) Unzip the downloaded Jboss version in c:\SF\ccrt
2) Add required libraries to server\default\lib directory (jug.jar, axis.jar, axis-ant.jar, hsql-mbean.jar**)
3) Remove all deployment setups except default (optional step to save space)
4) Change jboss-service.xml in \server\default\deploy\jbossweb-tomcat55.sar\META-INF so that it says <attribute name="Java2ClassLoadingCompliance">true</attribute> and <attribute name="UseJBossWebLoader">true</attribute>
5) Add the access to the Publication database in the hsqldb-ds.xml file for use of HSQL in the deploy directory**.
6) Add the Publication to the data directory of default (copy form other versions)**
** These steps are only required when CopperCore is used in combination with HSQL. When you use another database system you must copy the correspondig database binding xml document in the deployment directory and you must copy the JDBC drivers in the libpath somewhere.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great!Thank you for help. If you will find something more send me:) I will try to make it work and describe everything I do so there will be a good documentation at the end. I will start with MySQL integration.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are going to use MySQL you should skip those two steps. They are needed when using HSQL. However you should make sure that the mysql-ds.xml is copied in the deployment directory and that the MySQL jdbc driver is available on the classpath somewhere.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok so the mysql part should be ready. Can you tell me sth more about this point?
"-JBoss 4.x has a different class loading scheme. We modified this for CCRT. You will need to do this probably as well. Altenatively you may package the libraries differently in the EAR. (the new class loading is limited to the scope of the ear if my memory serves me correctly)."
You mean I should reorganize a build.xml so as a result I get a different coppercore.ear?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
JBoss 4 uses a different class loading scheme by default. This means that the build.xml files we provide must either be modified so all required libraries are included in each war, ear etc. Alternatively you can set the classloading beheviour of JBoss 4.x back to be compliant with JBoss 3.x by doing step 4:
4) Change jboss-service.xml in \server\default\deploy\jbossweb-tomcat55.sar\META-INF so that it says <attribute name="Java2ClassLoadingCompliance">true</attribute> and <attribute name="UseJBossWebLoader">true</attribute>
Then the build.xml don't need any modifications.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had the similar problem, but i quit to use a diferent JBOSS version, i use the coppercore Version...
Now i have a small problem, i integrate Coppercore into my Aplication, now i need to now how i can publish a package form remote machine? for example, when a teacher create a package into Reload and want to Update to my aplication, i use coppercore to make publishing and validating of the contents of the Package, but the coppercore give error, lanching one exceptions, "c:\ccrt\coppercore\data\upload\HelenGrives_BecomWriter9.zip (The system cannot find the path specified)", how i can solve that?
Thanks.
Paulo Hélio Alves
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a problem with mysql-ds.xml after I've added a part with Publication database.
I get a following error:
2007-05-16 13:53:11,190 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/D:/jboss-4.0.5.GA/server/default/deploy/mysql-ds.xml
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=MySqlDS
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jboss</user-name>
<password>jboss</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
Ok I solved it:) The presented above xml file is ok. The problem was that I had a copy of this file in the same folder and JBoss see all *-ds.xml files as datasources.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wanted to put coppercore.ear in my deply folder but I get some errors. Is there anything else I should do before this step?Im asking because i dont know if these errors are connected with jboss or coppercore?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No problem. But without knowing what is wrong it is very difficult to tell of course. A general step you have to take of course is making sure all required libraries are available. We added the libraries to the <<jboss>>/server/default/lib folder. Of course you can also modify the classpath so it includes the libraries. The required additional libraries are:
- jdbc drivers. In your case you should add the appropriate mysql jdbc driver
- axis.har
- axis-ant.jar
- jug.jar
- commons-fileupload-1.0.jar (if you are going the use to the demo webplayer)
You can download these libraries but more easy you can also copy them from the CCRT package
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok I dont get any more errors but there are still few warnings:
2007-05-23 17:37:45,923 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/CopperCoreTopic
javax.naming.NameNotFoundException: CopperCoreTopic not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
...
2007-05-23 17:37:45,933 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: topic/CopperCoreTopic reason: javax.naming.NameNotFoundException: CopperCoreTopic not bound
2007-05-23 17:37:45,933 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: topic/CopperCoreTopic
Ive tried to run publication.html but after chosing 'Publish' I get the following exception:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: uploadFolder parameter not found
org.coppercore.publication.Publication.init(Unknown Source)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.coppercore.publication.LDController.doGet(Unknown Source)
org.coppercore.publication.LDController.doPost(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have problems with compilation of sources and get all the time info that something is missing.
I put sources in: C:\coppercore_sources_3.1
My build.bat file looks like that:
@echo off
rem Build script for building CopperCore sources
rem $Revision: 1.6 $, $Date: 2007/03/21 15:41:17 $
setlocal
rem check if JAVA_HOME is set
if not "%JAVA_HOME%" == "" goto CHECK_JDK
echo JAVA_HOME environment variable is not set.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
echo Build is aborted...
goto SCRIPT_END
:CHECK_JDK
rem check if JAVA_HOME points to a JDK
if exist "%JAVA_HOME%\lib\tools.jar" goto END_CHECK_JDK
echo Could not locate %JAVA_HOME%\lib\tools.jar.
echo Make sure that JAVA_HOME points to a JDK and not a JRE.
echo Build is aborted...
goto SCRIPT_END
:END_CHECK_JDK
rem setup properties for running ant
rem add jboss server to ant properties
set AP=-DJBoss.home="C:\Program Files\jboss-4.0.5.GA\"
rem add java jdk to ant properties
set AP=%AP% -Djdk.home="%JAVA_HOME%"
rem add file upload library to ant properties
set AP=%AP% -Dupload.home="C:\coppercore_sources_3.1\coppercore\build\lib"
rem add Juid library to ant properties
set AP=%AP% -DJUG.home="C:\coppercore_sources_3.1\coppercore\build\lib"
ant %AP% %*
:SCRIPT_END
And my build.xml (the part I have changed)
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="C:\coppercore_sources_3.1\coppercore\build" default="rebuild" name="CopperCore Build">
<description>
This ant build file is used create the coppercore.ear, coppercore-client.jar, coppercore-common.jar and javadoc
for the CopperCore project.
</description>
<!-- These properties should be set with the -D option when calling ant -->
<property name="JBoss.home" value="C:\jboss-3.2.6"/>
<property name="upload.home" value="C:\coppercore_sources_3.1\coppercore\build"/>
<property name="JUG.home" value="C:\jug"/>
<property name="jdk.home" value="C:\j2sdk1.4.2_13"/>
<property name="deploy" value="default"/>
Do I wrote sth wrong?
I compile it normally using ant and I get
[javac] C:\coppercore_sources_3.1\coppercore\build\src\org\coppercore\public
ation\Publication.java:52: package org.apache.commons.fileupload does not exist
about 20m times.
When I tried to run build.bat I got
BUILD FAILED
C:\coppercore_sources_3.1\coppercore\build\build.xml:47: C:\Program Files\jboss-
4.0.5.GA" -Djdk.home C:\j2sdk1.4.2_13 -Dupload.home C:\coppercore_sources_3.1\co
ppercore\build\lib -DJUG.home C:\coppercore_sources_3.1\coppercore\build\lib\cli
ent not found.
Im using Windows XP
Thanks for any help
You are probably missing a couple of libraries and some paths are set incorrectly. The Jboss.home should point to the root of a jboss-4.0.4.GA installation (new versions will probably work as well). The upload.home should point to the Apache upload library (see Apache commons for that). Finally the JUG.home should point to the loaction where the jug.jar can be found. It can be difficult to download the latter from the internet. If you can find this library on any of the other you might want to consider installing CCRT because all the required libraries are included in it.
Furthermore CCRT contains the compiled versions of CopperCore and is ready to run. It is even fairly simple to switch database versions without having to recompile.
Thank you for help:) The problem was with the the commons-fileupload (btw way Coppercore uses old version 1.0?). The compilation is succesfull. However I dont have a webplayer.war in my coppercore folder:/ What is wrong?
I met another problem. After placing coppercore.ear in my JBoss deploy folder I get:
ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.util.Collection org.coppercore.entity.UnitOfLearningHome.findAllUnitOfLearnings() throws javax.ejb.FinderException, causedBy:
javax.naming.NameNotFoundException: Publication not bound
I would be happy if anyone could help me because Im fighting with it for some time.
This message is a ty[ical result of the Publication name not being correctly bound to a datasource. I don't know if you changed anything to the original CCRT setup or not but appearently the Publication has not been setup correctly. For this purpose in CCRT the following lines of XML have been added to the hsqldb-ds.xml file in the deploy directory:
<local-tx-datasource>
<jndi-name>Publication</jndi-name>
<connection-url>jdbc:hsqldb:hsql://127.0.0.1:1701</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>java</user-name>
<password>java</password>
<min-pool-size>5</min-pool-size>
<depends>jboss:service=HSQLSERVER</depends>
</local-tx-datasource>
This binds Publication to the HSQL database. If you are trying to use another database Publication will be bound to another database via a similar construct. In the sources you will find examples of such bindings for other DBMSs. See also https://sourceforge.net/forum/forum.php?thread_id=1722955&forum_id=345604
I don't know why the binding is missing in your case but I hope this helps track the problem.
I dont use CCRT but build everything myself. In my C:\coppercore\database\HSQL\hsqldb-ds.xml file there are the lines that you wrote.
If you starting from scratch there are numerous things you have to setup. Unless you have a very good reason for doing so I would advice against it. Remember that CCRT is not using a normal JBoss setup but a modified version of it. You will need to take care of things like:
- the setup of the database. Merely having a reference to the HSQL database is not sufficient. An MBean needs to be installed, the database scripts need to be placed in the correct location etc.
-JBoss 4.x has a different class loading scheme. We modified this for CCRT. You will need to do this probably as well. Altenatively you may package the libraries differently in the EAR. (the new class loading is limited to the scope of the ear if my memory serves me correctly).
- you will need to add the necessary libraries to the Jboss lib path
I probably forgot some steps. So if there is not a very good reason for doing so I would advice taking CCRT as starting point and continue from there.
In JBoss log I also found another problem
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/CopperCoreTopic
javax.naming.NameNotFoundException: CopperCoreTopic not bound
....
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: topic/CopperCoreTopic reason: javax.naming.NameNotFoundException: CopperCoreTopic not bound
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: topic/CopperCoreTopic
, but these are only warnings so main problem is still this "Publication not bound"
I have tried to use the hsqldb-ds.xml from CCRT package but it doest help.
Maybe the problem is with the software. I use:
jboss-4.0.5.GA
java 1.6.0.0.1
I want to integrate a coppercore with our academic service-oriented so I can not use CCRT (or am I wrong? What do you suggest) I will start with the steps you have gave me and present here my progress and problems:)After all it would be good to have a full instruction how to do it.
Of course I cannot be really the judge on that. But I would advice to use an external database for more production oriented tasks like MySQL. That saves you the trouble of integrating CopperCore with HSQL. The setup will be simpeler. And I agree that a description of how to setup the environment from scratch would not be bad at all. I looked up some of the notes we used when setting the environment up. Maybe this is helpful.
Setup of JBoss 4.04.GA
1) Unzip the downloaded Jboss version in c:\SF\ccrt
2) Add required libraries to server\default\lib directory (jug.jar, axis.jar, axis-ant.jar, hsql-mbean.jar**)
3) Remove all deployment setups except default (optional step to save space)
4) Change jboss-service.xml in \server\default\deploy\jbossweb-tomcat55.sar\META-INF so that it says <attribute name="Java2ClassLoadingCompliance">true</attribute> and <attribute name="UseJBossWebLoader">true</attribute>
5) Add the access to the Publication database in the hsqldb-ds.xml file for use of HSQL in the deploy directory**.
6) Add the Publication to the data directory of default (copy form other versions)**
** These steps are only required when CopperCore is used in combination with HSQL. When you use another database system you must copy the correspondig database binding xml document in the deployment directory and you must copy the JDBC drivers in the libpath somewhere.
Great!Thank you for help. If you will find something more send me:) I will try to make it work and describe everything I do so there will be a good documentation at the end. I will start with MySQL integration.
I have two questions to this JBoss setup.
What should I add and where can I find something like hsql-mbean.jar but for MySQL database?
In point 6 I understand that I have to copy the Publication catalogue from my coppercore\build and copy it to jboss-4.0.5.GA\server\default\data
If you are going to use MySQL you should skip those two steps. They are needed when using HSQL. However you should make sure that the mysql-ds.xml is copied in the deployment directory and that the MySQL jdbc driver is available on the classpath somewhere.
Ok so the mysql part should be ready. Can you tell me sth more about this point?
"-JBoss 4.x has a different class loading scheme. We modified this for CCRT. You will need to do this probably as well. Altenatively you may package the libraries differently in the EAR. (the new class loading is limited to the scope of the ear if my memory serves me correctly)."
You mean I should reorganize a build.xml so as a result I get a different coppercore.ear?
JBoss 4 uses a different class loading scheme by default. This means that the build.xml files we provide must either be modified so all required libraries are included in each war, ear etc. Alternatively you can set the classloading beheviour of JBoss 4.x back to be compliant with JBoss 3.x by doing step 4:
4) Change jboss-service.xml in \server\default\deploy\jbossweb-tomcat55.sar\META-INF so that it says <attribute name="Java2ClassLoadingCompliance">true</attribute> and <attribute name="UseJBossWebLoader">true</attribute>
Then the build.xml don't need any modifications.
Hello!
I had the similar problem, but i quit to use a diferent JBOSS version, i use the coppercore Version...
Now i have a small problem, i integrate Coppercore into my Aplication, now i need to now how i can publish a package form remote machine? for example, when a teacher create a package into Reload and want to Update to my aplication, i use coppercore to make publishing and validating of the contents of the Package, but the coppercore give error, lanching one exceptions, "c:\ccrt\coppercore\data\upload\HelenGrives_BecomWriter9.zip (The system cannot find the path specified)", how i can solve that?
Thanks.
Paulo Hélio Alves
I think your problem is off topic here. Could you please start a new thread stating your problem.
I have a problem with mysql-ds.xml after I've added a part with Publication database.
I get a following error:
2007-05-16 13:53:11,190 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/D:/jboss-4.0.5.GA/server/default/deploy/mysql-ds.xml
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=MySqlDS
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml 41016 2006-02-07 14:23:00Z acoliver $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jboss</user-name>
<password>jboss</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>Publication</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/ld_publication</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>java</user-name>
<password>java</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
</local-tx-datasource>
</datasources>
I have to use these two datasources. How should I modify mysql-ds.xml?
This is not really a CopperCore issues anymore but an deployment/integration issue. So I am afraid that I can not be of much help.
Ok I solved it:) The presented above xml file is ok. The problem was that I had a copy of this file in the same folder and JBoss see all *-ds.xml files as datasources.
So JBoss and MySQL are ready:)What are the next steps?
I wanted to put coppercore.ear in my deply folder but I get some errors. Is there anything else I should do before this step?Im asking because i dont know if these errors are connected with jboss or coppercore?
No problem. But without knowing what is wrong it is very difficult to tell of course. A general step you have to take of course is making sure all required libraries are available. We added the libraries to the <<jboss>>/server/default/lib folder. Of course you can also modify the classpath so it includes the libraries. The required additional libraries are:
- jdbc drivers. In your case you should add the appropriate mysql jdbc driver
- axis.har
- axis-ant.jar
- jug.jar
- commons-fileupload-1.0.jar (if you are going the use to the demo webplayer)
You can download these libraries but more easy you can also copy them from the CCRT package
Ok I dont get any more errors but there are still few warnings:
2007-05-23 17:37:45,923 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/CopperCoreTopic
javax.naming.NameNotFoundException: CopperCoreTopic not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
...
2007-05-23 17:37:45,933 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: topic/CopperCoreTopic reason: javax.naming.NameNotFoundException: CopperCoreTopic not bound
2007-05-23 17:37:45,933 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: topic/CopperCoreTopic
Ive tried to run publication.html but after chosing 'Publish' I get the following exception:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: uploadFolder parameter not found
org.coppercore.publication.Publication.init(Unknown Source)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.coppercore.publication.LDController.doGet(Unknown Source)
org.coppercore.publication.LDController.doPost(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)