[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Spring WS on Glassfish  XML
Forum Index -> Terracotta for Spring
Author Message
yusufsoysal

neo

Joined: 02/25/2009 00:39:26
Messages: 8
Offline

Hello,

I am trying to write a simple Spring application which will run on Glassfish. Application has one bean that needs to be shared. I modified the Glassfish's asadmin command like:

"%AS_JAVA%\bin\java" -Xbootclasspath/p:D:\dev\eclipse\workspace\XXXXX\dso-boot-hotspot_win32_150_15.jar: -Dtc.config="D:\dev\eclipse\workspace\XXXXX\tc-config.xml" -Dtc.install-root="D:\dev\Terracotta\terracotta-2.7.3" .....

and then I also modified the domain.xml via Glassfish admin console like:

<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
<jvm-options>-Dtc.install-root=D:/dev/Terracotta/terracotta-2.7.3</jvm-options>
<jvm-options>-Dtc.config=D:/dev/eclipse/workspace/XXXXX/tc-config.xml</jvm-options>
<jvm-options>-Xbootclasspath/p:D:/dev/eclipse/workspace/XXXXX/dso-boot-hotspot_win32_150_15.jar:</jvm-options>

I start both Terracotta server and glassfish, but in TerraCotta admin console, there seems to be no client connected. Am I missing anything?

Here is my web.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
 <web-app version="2.5" 
 	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/web-app_2_5.xsd">
 	
 	<display-name>XXXXX</display-name>
 	
 	<context-param>
 		<param-name>contextConfigLocation</param-name>
 		<param-value>
 			/WEB-INF/applicationContext.xml
 		</param-value>
 	</context-param>
 	
 	<listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
 	
 	<servlet>
 	   <servlet-name>jaxws-servlet</servlet-name>
 	   <servlet-class>
 	      com.sun.xml.ws.transport.http.servlet.WSSpringServlet
 	   </servlet-class>
 	</servlet>
 	
 	<servlet-mapping>
 	   <servlet-name>jaxws-servlet</servlet-name>
 	   <url-pattern>/register</url-pattern>
 	</servlet-mapping>
 		
 </web-app>
 


And here is the applicationContext.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:ws="http://jax-ws.dev.java.net/spring/core"
 	xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns:flow="http://www.springframework.org/schema/webflow-config"
 	xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
            http://www.springframework.org/schema/webflow-config
            http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd
            http://jax-ws.dev.java.net/spring/core
 	       http://jax-ws.dev.java.net/spring/core.xsd
 	       http://jax-ws.dev.java.net/spring/servlet
 	       http://jax-ws.dev.java.net/spring/servlet.xsd">
 
 	<wss:binding url="/register" service="#registerWebService"></wss:binding>
 	
 	<ws:service id="registerWebService" bean="#registerWSImpl"></ws:service>
 
 	<bean id="registerWSImpl" class="com.xxxxx.proxy.webservice.RegisterWebService">
 		<property name="store" ref="clusteredStore"></property>
 	</bean>
 	
 	<bean id="clusteredStore" class="com.xxxxx.proxy.clustered.Store" />
 	
 </beans>


And at last tc-config.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
 <con:tc-config xmlns:con="http://www.terracotta.org/config">
   <servers>
     <server host="%i" name="localhost">
       <dso-port>9510</dso-port>
       <jmx-port>9520</jmx-port>
       <data>terracotta/server-data</data>
       <logs>terracotta/server-logs</logs>
       <statistics>terracotta/cluster-statistics</statistics>
     </server>
     <update-check>
       <enabled>false</enabled>
     </update-check>
   </servers>
   <clients>
     <logs>terracotta/client-logs</logs>
     <statistics>terracotta/client-statistics/%D</statistics>
     <modules>
       <module group-id="org.terracotta.modules" name="spring-config" version="2.7.3"/>
       <module group-id="org.terracotta.modules" name="clustered-glassfish-2.0" version="2.7.3"/>
     </modules>
   </clients>
   <application>
     <spring>
       <jee-application name="XXXXX">
         <application-contexts>
           <application-context>
             <paths>
               <path>/WEB-INF/applicationContext.xml</path>
             </paths>
             <beans>
               <bean name="clusteredStore"/>
             </beans>
           </application-context>
         </application-contexts>
         <instrumented-classes>
           <include>
             <class-expression>com.xxxxx.proxy.clustered..*</class-expression>
           </include>
         </instrumented-classes>
       </jee-application>
     </spring>
   </application>
 </con:tc-config>
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

yusufsoysal wrote:
Hello,

"%AS_JAVA%\bin\java" -Xbootclasspath/p:D:\dev\eclipse\workspace\XXXXX\dso-boot-hotspot_win32_150_15.jar: -Dtc.config="D:\dev\eclipse\workspace\XXXXX\tc-config.xml" -Dtc.install-root="D:\dev\Terracotta\terracotta-2.7.3" .....

 


This looks strange. Your boot jar is in your eclipse workspace but tc is installed to d:\dev\Terracotta... Also, there appears in the text listing you provided a trailing colon - the name of the boot jar should be exactly correct with respect to it's filename on your system.

Are you sure the boot jar you are referring to exists?

[WWW]
yusufsoysal

neo

Joined: 02/25/2009 00:39:26
Messages: 8
Offline

Yes, boot jar does exists. After reading your message, I changed the asadmin command as follows:

"%AS_JAVA%\bin\java" -Xbootclasspath/p:"D:\dev\Terracotta\terracotta-2.7.3\lib\dso-boot\dso-boot-hotspot_win32_150_15.jar.jar" -Dtc.config="D:\dev\eclipse\workspace\XXXXX\tc-config.xml" -Dtc.install-root="D:\dev\Terracotta\terracotta-2.7.3"

I start the Terracotta by using bin\start-tc-server.bat and use the -f option:
D:\dev\Terracotta\terracotta-2.7.3\bin>start-tc-server.bat -f D:/dev/eclipse/workspace/XXXXX/tc-config.xml

But there seems to be no client connected! I should see one client (Glassfish) connected to Terracotta in Terracotta admin application, right?
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Yes you are correct. Something is clearly wrong regarding the configuration of your client.

I don't know how to help you with that - the document here describes what is supposed to happen:

http://www.terracotta.org/web/display/orgsite/GlassFish+Integration#GlassFishIntegration-startclients

If you cannot get your java to start and give you information that Terracotta has been loaded, then something is incorrect about your settings or the config you are passing.

When you start your Glassfish server, do you see the Terracotta output or not?

[WWW]
yusufsoysal

neo

Joined: 02/25/2009 00:39:26
Messages: 8
Offline

I found the problem :) Glassfish was running in jdk 6 but terracotta in jdk 5 :) Sorry about that, I thought I was able to set the jdk to 5 successfully :(

Now I changed both of them to jdk 6. I can see Glassfish as a client in Terracotta Admin Application. But there is an error in Glassfish server.log. Do you know the reason to that?


Code:
File0 - Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager"
 File0 - java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager
 File0 - 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 File0 - 	at java.security.AccessController.doPrivileged(Native Method)
 File0 - 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 File0 - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 File0 - 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
 File0 - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 File0 - 	at java.util.logging.LogManager$1.run(LogManager.java:166)
 File0 - 	at java.security.AccessController.doPrivileged(Native Method)
 File0 - 	at java.util.logging.LogManager.<clinit>(LogManager.java:156)
 File0 - 	at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.systemLoaderInitialized(ClassProcessorHelper.java:741)
 File0 - 	at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1327)
 File0 - 	at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1286)
 File0 - 2009-02-27 16:57:21,468 INFO - Terracotta 2.7.3, as of 20090129-100112 (Revision 11424 by cruise@WXPMO0 from 2.7)
 File0 - 2009-02-27 16:57:21,902 INFO - Configuration loaded from the file at 'D:\dev\eclipse\workspace\XXXXX\tc-config.xml'.
 File0 - 2009-02-27 16:57:22,073 INFO - Log file: 'D:\dev\glassfish\domains\domain1\config\terracotta\client-logs\terracotta-client.log'.
 File0 - 2009-02-27 16:57:24,856 INFO - Statistics buffer: 'D:\dev\glassfish\domains\domain1\config\terracotta\client-statistics\20090227165724452'.
 File0 - 2009-02-27 16:59:06,422 INFO - Connection successfully established to server at 127.0.0.1:9510
 File0 - Application server is listening at address 9009 for debugger to attach using transport dt_socket
 File0 - recursive call into SystemOutandErrhandler
 File0 - java.lang.RuntimeException: recursivecall
 File0 - 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:359)
 File0 - 	at java.io.PrintStream.write(PrintStream.java:432)
 File0 - 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
 File0 - 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
 File0 - 	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
 File0 - 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
 File0 - 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
 File0 - 	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:203)
 File0 - 	at java.io.Writer.write(Writer.java:140)
 File0 - 	at java.util.logging.StreamHandler.publish(StreamHandler.java:192)
 File0 - 	at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
 File0 - 	at java.util.logging.Logger.log(Logger.java:472)
 File0 - 	at java.util.logging.Logger.doLog(Logger.java:494)
 File0 - 	at java.util.logging.Logger.log(Logger.java:517)
 File0 - 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:368)
 File0 - 	at java.io.PrintStream.write(PrintStream.java:432)
 File0 - 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
 File0 - 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
 File0 - 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
 File0 - 	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
 File0 - 	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
 File0 - 	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
 File0 - 	at java.util.logging.StreamHandler.flush(StreamHandler.java:225)
 File0 - 	at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:89)
 File0 - 	at java.util.logging.Logger.log(Logger.java:472)
 File0 - 	at java.util.logging.Logger.doLog(Logger.java:494)
 File0 - 	at java.util.logging.Logger.log(Logger.java:558)
 File0 - 	at com.sun.enterprise.server.ApplicationServer.printStartupInfo(ApplicationServer.java:618)
 File0 - 	at com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer.java:170)
 File0 - 	at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:103)
 File0 - 	at com.sun.enterprise.server.PEMain.run(PEMain.java:399)
 File0 - 	at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
 File0 - 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 File0 - 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 File0 - 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 File0 - 	at java.lang.reflect.Method.invoke(Method.java:597)
 File0 - 	at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
 
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

The exception looks like http://jira.terracotta.org/jira/browse/CDV-232. It isnt clear to me how "bad" that exception is.

Reading through your posts it seems that you are adding terracotta in two places: (1) The asadmin script and (2) in the domain config. The asadmin program is really just a launcher for the real app server process. In general that process does not need to be terracotta enabled. In theory that process might need to connect to some clustered data, but I imagine it is your application that you are trying to cluster :-)

Tim Eck (terracotta engineer)
ppeisker

neo

Joined: 03/13/2009 09:00:06
Messages: 3
Offline

We have the same problem using

- terracotta-2.7.3
- glassfish-installer-v2.1-b60e-windows

The ticket in Jira http://jira.terracotta.org/jira/browse/CDV-232 names a Severity of "3 Feature failure (but usable), workaround available". Is there any workaround available or do we have to switch to a different version of terracotta/glassfish?

Thanks,

Patrick
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

I don't think there is any known workaround despite the severity description.

I haven't tried it but I think if the system property that defines the custom logging manager (java.util.logging.manager) was omitted then this exception wouldn't be tripped. Perhaps that is defined in domain.xml? To be sure I haven't tried this and I also don't the implementation of glassfish well enough to know if there will be any adverse effects of not using their logging manager.




Tim Eck (terracotta engineer)
ppeisker

neo

Joined: 03/13/2009 09:00:06
Messages: 3
Offline

I removed the definition of the custom logging manager in launcher.xml and processLauncher.xml and the restarted Glassfish. Now I am left with the following error:

Code:
 16-Mar-2009 10:50:22 com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
 INFO: 
 C:/Program Files/Java/jdk1.5.0_11/jre/..\bin\java
 -Dcom.sun.aas.instanceRoot=C:/Java/glassfish-2-1/domains/domain1
 -Dcom.sun.aas.ClassPathPrefix=
 -Dcom.sun.aas.ClassPathSuffix=
 -Dcom.sun.aas.ServerClassPath=
 -Dcom.sun.aas.classloader.appserverChainJars.ee=
 -Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,j2ee-svc.jar
 -Dcom.sun.aas.classloader.excludesList=admin-cli.jar,appserv-upgrade.jar,sun-appserv-ant.jar
 -Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
 -Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar
 -Dcom.sun.aas.classloader.serverClassPath.ee=/lib/hadbjdbc4.jar,C:/Java/glassfish-2-1/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,/lib/dbstate.jar,/lib/hadbm.jar,/lib/hadbmgt.jar,/lib/mfwk_instrum_tk.jar
 -Dcom.sun.aas.classloader.serverClassPath=C:/Java/glassfish-2-1/lib/install/applications/jmsra/imqjmsra.jar,C:/Java/glassfish-2-1/imq/lib/jaxm-api.jar,C:/Java/glassfish-2-1/imq/lib/fscontext.jar,C:/Java/glassfish-2-1/imq/lib/imqbroker.jar,C:/Java/glassfish-2-1/imq/lib/imqjmx.jar,C:/Java/glassfish-2-1/lib/ant/lib/ant.jar,C:/Java/glassfish-2-1/lib/SUNWjdmk/5.1/lib/jdmkrt.jar
 -Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,jesmf-plugin.jar,/lib/dbstate.jar,/lib/hadbjdbc4.jar,jgroups-all.jar,/lib/mfwk_instrum_tk.jar
 -Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,C:/Program Files/Java/jdk1.5.0_11/jre/../lib/tools.jar,install/applications/jmsra/imqjmsra.jar,com-sun-commons-launcher.jar,com-sun-commons-logging.jar,C:/Java/glassfish-2-1/imq/lib/jaxm-api.jar,C:/Java/glassfish-2-1/imq/lib/fscontext.jar,C:/Java/glassfish-2-1/imq/lib/imqbroker.jar,C:/Java/glassfish-2-1/imq/lib/imqjmx.jar,C:/Java/glassfish-2-1/imq/lib/imqxm.jar,webservices-rt.jar,webservices-tools.jar,mail.jar,appserv-jstl.jar,jmxremote_optional.jar,C:/Java/glassfish-2-1/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar,C:/Java/glassfish-2-1/updatecenter/lib/updatecenter.jar,C:/Java/glassfish-2-1/jbi/lib/jbi.jar,C:/Java/glassfish-2-1/imq/lib/imqjmx.jar,C:/Java/glassfish-2-1/lib/ant/lib/ant.jar,dbschema.jar
 -Dcom.sun.aas.configName=server-config
 -Dcom.sun.aas.configRoot=C:/Java/glassfish-2-1/config
 -Dcom.sun.aas.defaultLogFile=C:/Java/glassfish-2-1/domains/domain1/logs/server.log
 -Dcom.sun.aas.domainName=domain1
 -Dcom.sun.aas.installRoot=C:/Java/glassfish-2-1
 -Dcom.sun.aas.instanceName=server
 -Dcom.sun.aas.processLauncher=SE
 -Dcom.sun.aas.promptForIdentity=true
 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
 -Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet
 -Dcom.sun.enterprise.server.ss.ASQuickStartup=false
 -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
 -Dcom.sun.enterprise.taglisteners=jsf-impl.jar
 -Dcom.sun.updatecenter.home=C:/Java/glassfish-2-1/updatecenter
 -Ddomain.name=domain1
 -Djava.endorsed.dirs=C:/Java/glassfish-2-1/lib/endorsed
 -Djava.ext.dirs=C:/Program Files/Java/jdk1.5.0_11/jre/../lib/ext;C:/Program Files/Java/jdk1.5.0_11/jre/../jre/lib/ext;C:/Java/glassfish-2-1/domains/domain1/lib/ext;C:/Java/glassfish-2-1/javadb/lib
 -Djava.library.path=C:\Java\glassfish-2-1\lib;C:\Java\glassfish-2-1\lib;C:\Java\glassfish-2-1\bin;C:\Java\glassfish-2-1\lib
 -Djava.security.auth.login.config=C:/Java/glassfish-2-1/domains/domain1/config/login.conf
 -Djava.security.policy=C:/Java/glassfish-2-1/domains/domain1/config/server.policy
 -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
 -Djavax.net.ssl.keyStore=C:/Java/glassfish-2-1/domains/domain1/config/keystore.jks
 -Djavax.net.ssl.trustStore=C:/Java/glassfish-2-1/domains/domain1/config/cacerts.jks
 -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
 -Djmx.invoke.getters=true
 -Dsun.rmi.dgc.client.gcInterval=3600000
 -Dsun.rmi.dgc.server.gcInterval=3600000
 -Dtc.config="C:/Java/terracotta/terracotta-2.7.3/tc-config.xml"
 -Dtc.install-root="C:/Java/terracotta/terracotta-2.7.3"
 -client
 -XX:+UnlockDiagnosticVMOptions
 -XX:MaxPermSize=192m
 -Xmx512m
 -XX:NewRatio=2
 -Xbootclasspath/p:"C:/Java/terracotta/terracotta-2.7.3/lib/dso-boot/dso-boot-hotspot_win32_150_11.jar"
 -XX:+LogVMOutput
 -XX:LogFile=C:/Java/glassfish-2-1/domains/domain1/logs/jvm.log
 -cp
 C:/Java/glassfish-2-1/lib/jhall.jar;C:\Java\glassfish-2-1\lib\appserv-launch.jar
 com.sun.enterprise.server.PELaunch
 start
 2009-03-16 10:50:23,611 INFO - Terracotta 2.7.3, as of 20090129-100112 (Revision 11424 by cruise@WXPMO0 from 2.7)
 2009-03-16 10:50:24,236 INFO - Configuration loaded from the file at 'C:\Java\terracotta\terracotta-2.7.3\tc-config.xml'.
 2009-03-16 10:50:24,829 INFO - Log file: 'C:\logs\terracotta\client-logs\terracotta-client.log'.
 2009-03-16 10:50:26,486 INFO - Statistics buffer: 'C:\logs\terracotta\client-statistics\20090316105026032'.
 2009-03-16 10:50:26,907 INFO - Connection successfully established to server at 192.168.5.64:9510
 recursive call into SystemOutandErrhandler
 java.lang.RuntimeException: recursivecall
 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:359)
 	at java.io.PrintStream.write(PrintStream.java:414)
 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
 	at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
 	at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395)
 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:146)
 	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:204)
 	at java.io.Writer.write(Writer.java:126)
 	at java.util.logging.StreamHandler.publish(StreamHandler.java:192)
 	at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
 	at java.util.logging.Logger.log(Logger.java:452)
 	at java.util.logging.Logger.doLog(Logger.java:474)
 	at java.util.logging.Logger.log(Logger.java:497)
 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:368)
 	at java.io.PrintStream.write(PrintStream.java:414)
 	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
 	at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
 	at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
 	at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
 	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
 	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
 	at java.util.logging.StreamHandler.flush(StreamHandler.java:225)
 	at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:89)
 	at java.util.logging.Logger.log(Logger.java:452)
 	at java.util.logging.Logger.doLog(Logger.java:474)
 	at java.util.logging.Logger.log(Logger.java:538)
 	at com.sun.enterprise.server.ApplicationServer.printStartupInfo(ApplicationServer.java:618)
 	at com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer.java:170)
 	at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:103)
 	at com.sun.enterprise.server.PEMain.run(PEMain.java:399)
 	at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
 	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:585)
 	at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
 


Not sure if this is due to a Glassfish bug or if I still miss something.
msnuser168

jedi

Joined: 03/09/2009 06:38:39
Messages: 142
Offline

Hi, there
I am not using Spring and just simple web-service on Glassfish.
I got similar exception. It looks like the connection established to Terracotta and change something made Glassfish failed.

com.sun.enterprise.server.PELaunch
start
Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager"
java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.util.logging.LogManager$1.run(LogManager.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:156)
at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.systemLoaderInitialized(ClassProcessorHelper.java:741)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1336)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1295)
2009-03-16 21:10:44,984 INFO - Terracotta 2.7.3, as of 20090129-100112 (Revision 11424 by cruise@WXPMO0 from 2.7)
2009-03-16 21:10:45,687 INFO - Configuration loaded from the file at 'R:\glassfish\bin\tc-config.xml'.

WARN: The log directory, 'C:\Documents and Settings\Administrator\terracotta\client-logs', is already in use by another Terracotta process. Logging will proceed to the console only.

2009-03-16 21:10:48,281 INFO - Statistics buffer: 'R:\glassfish\domains\domain1\config\statistics-192.168.1.2'.
2009-03-16 21:10:53,718 INFO - Connection successfully established to server at 192.168.1.3:9510
2009/3/16 下午 09:10:54 com.sun.enterprise.server.PEMain main
....
....
....
2009/3/16 下午 09:10:59 com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
Warning: java.lang.reflect.InvocationTargetException
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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: java.lang.NoClassDefFoundError: com/tc/tomcat/session/VersionHelper
at org.apache.catalina.core.ContainerBase.<init>(ContainerBase.java:265)
at org.apache.catalina.core.StandardEngine.<init>(StandardEngine.java:88)
at com.sun.enterprise.web.EmbeddedWebContainer$WebEngine.<init>(EmbeddedWebContainer.java:425)
at com.sun.enterprise.web.EmbeddedWebContainer.createEngine(EmbeddedWebContainer.java:402)
at com.sun.enterprise.web.PEWebContainer.createEngine(PEWebContainer.java:456)
at com.sun.enterprise.web.PEWebContainer.init(PEWebContainer.java:221)
at com.sun.enterprise.web.PEWebContainer.createInstance(PEWebContainer.java:778)
at com.sun.enterprise.web.PEWebContainerLifecycle.onInitialization(PEWebContainerLifecycle.java:70)
at com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer.java:262)
at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:101)
at com.sun.enterprise.server.PEMain.run(PEMain.java:401)
at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.tc.tomcat.session.VersionHelper
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 17 more


teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

This last question seems to be duplicated in this other thread. It will only be answered there.

http://forums.terracotta.org/forums/posts/list/1907.page

Tim Eck (terracotta engineer)
ppeisker

neo

Joined: 03/13/2009 09:00:06
Messages: 3
Offline

I tried to use different versions of Glassfish

glassfish-installer-v2ur2-b04-windows.jar, glassfish-installer-v2.1-b60e-windows.jar

but I still get the same error as mentioned in my posts above. Any suggestions?
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

I can't really tell you whether trying to remove the custom sun log manager that way is going to work or not. It seems to be not working obviously so I suggest restoring that stuff and run with the exception logged on startup.

As far as I've been able to tell it doesn't cause any ill effects (other than the exception getting printed which is annoying).

If you search around you'll find other instances of that exception getting triggered by other things that use java agents (eg. profilers, etc)


Tim Eck (terracotta engineer)
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team