I've read many topics such as Tomcat server is not starting as service: %1 is not a valid Win32 application or Tomcat 7 won't start
But it did not worked for me.
First of all I'm running Windows Server 64bits. I performed the following steps:
Downloaded Xampp (I believe it's 64bits..because I couldn't find a
64 bits in their website)
Download JDK 8.20 x64 bits
Since I was in doubt about the Tomcat in Xampp, I've download the Tomcat x64 and replace the whole content in the c:\xampp\tomcat\
After everything is installed I needed to update the Environment Variables, and so I did.
After completed this steps I installed successfully the Tomcat Service, although it gives error when starting. I found the logs of the errors I and get the following:
[info] [ 5096] Commons Daemon procrun (1.0.15.0 32-bit) started
[info] [ 5096] Running 'Tomcat7' Service...
[info] [ 4876] Starting service...
[error] [ 4876] %1 is not a valid Win32 application.
[error] [ 4876] Failed creating java C:\Program Files\Java\jdk1.8.0_20\bin\server\jvm.dll
[error] [ 4876] %1 is not a valid Win32 application.
[error] [ 4876] ServiceStart returned 1
[error] [ 4876] %1 is not a valid Win32 application.
[info] [ 5096] Run service finished.
[info] [ 5096] Commons Daemon procrun finished
So I check if the file jvm.dll existed in that folder (C:\Program Files\Java\jdk1.8.0_20\bin\server\jvm.dll), but I found that it does not. I searched a little more and I found that file is actually in the folder C:\Program Files\Java\jre1.8.0_20\bin\server\jvm.dll!
I then open Tomcat7 at C:\xampp\tomcat\bin and changed the path to the correct one.
But still, I keep getting the same error. What am I doing wrong?
Solved.
So, I had to do two steps.
Download jre-7u67-windows-x64.exe
Select, in the Tomcat7, in the tab "Java", the option "Use Default".
After that I was able to start the service properly. Plus, I've changed the port of tomcat in xampp, since by default is 8080, I changed to 9000 and I can now enter the project by localhost:9000/myproject
Related
I am new to Apache OFBiz. I have downloaded and installing the OFBiz by instructions. I have loaded the data successfully.
But when am running OFBiz using gradlew it stopped at birt-container. I have added the console information here.
Build process stopped at 91% with the message of "Started container birt-container" for 5 hours and I have stopped the process. Still no idea why it is stopping here.
2017-05-04 11:01:42,143 |main |CatalinaContainer |I| Connector HTTP/1.1 # 8443 - secure [org.apache.coyote.http11.Http11NioProtocol] started.
2017-05-04 11:01:42,143 |main |CatalinaContainer |I| Started Apache Tomcat/8.0.37
2017-05-04 11:01:42,143 |main |ContainerLoader |I| Started container catalina-container
2017-05-04 11:01:42,143 |main |ContainerLoader |I| Starting container birt-container
2017-05-04 11:01:42,143 |main |BirtContainer |I| Start BIRT container
2017-05-04 11:01:42,152 |main |BirtContainer |I| Startup BIRT platform
2017-05-04 11:01:43,034 |main |BirtContainer |I| Create factory object
2017-05-04 11:01:43,052 |main |BirtContainer |I| Create report engine
2017-05-04 11:01:43,130 |main |BirtContainer |I| BIRT supported formats: xlsx, postscript, docx, pptx, pdf, ppt, xls_spudsoft, doc, html,
odp, xls, odt, ods
2017-05-04 11:01:43,130 |main |ContainerLoader |I| Started container birt-container
> Building 91% > :ofbiz
The Gradle percentage is bit misleading here, it does not reach 100% as long as OFBiz is running. I think you just assumed after building the service will be up. Not like that. Once the Service is up it will be in 91%. But the Service has been started. You can access the E-Commerce and other services. Once you are running service get the following URL (ex).
localhost:8443/ap/control/main
You will be redirected to admin login page. Give user as "admin" and password as "ofbiz". Do the changes and test your data as you want in Accounting, Manufacturing, HR , etc..
Note: After completed your process stop the process using "stopofbiz" shell script file under tools folder. After stop the service you can able to see the build will be reach 100% in service console.
This is a duplicate to Installing OfBiz in debug mode hangs
I think OFBiz does not hang and that you should be able to access and work with it without problems. The Gradle percentage is bit misleading here, it does not reach 100% as long as OFBiz is running.
See also https://lists.apache.org/thread.html/26543a82adf1f8d9a8bec47975e8d87f750c2de2f2da7e242b04a72e#%3Cuser.ofbiz.apache.org%3E
Prepare OFBiz:
Clean all:
gradlew cleanAll loadDefault testIntegration
Note: Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!
MS Windows: gradlew cleanAll loadDefault
Unix-like OS: ./gradlew cleanAll loadDefault
Start OFBiz:
MS Windows: gradlew ofbiz
Unix-like OS: ./gradlew ofbiz
Reference: After download http://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-16.11.02.zip , unzip, look for
apache-ofbiz-16.11.02/tools/documentation/README.md.html
I have jdk 1.7
path,classpath,catalina_home are set
this was the error
E:\apache-tomcat-7.0.56\bin>tomcat7.exe
The system cannot find the path specified.
Unable to create logger at ''
[2014-11-23 23:03:48] [error] [ 7388] Failed creating java C:\Program Files\Java
\jre7\bin\server\jvm.dll
[2014-11-23 23:03:48] [error] [ 7388] The system cannot find the path specified.
[2014-11-23 23:03:48] [error] [ 7388] ServiceStart returned 1
[2014-11-23 23:03:48] [error] [ 7388] The system cannot find the path specified.
[2014-11-23 23:03:48] [error] [ 7388] Commons Daemon procrun failed with exit va
lue: 3 (Failed to run service as console application)
[2014-11-23 23:03:48] [error] [ 7388] The system cannot find the path specified.
The system cannot find the path specified.
Failed to run service as console application
E:\apache-tomcat-7.0.56\bin>
I had the same problem. Here is what I was able to figure out:
This error happens because you don't have the privilege to modify the E:\apache-tomcat-7.0.56\logs directory. In my case, it was because I installed Tomcat by doing starting a CMD shell in "Run as administrator" mode (which forces you to log in as an administrator), and then doing "unzip apache-tomcat-7.0.57-windows-x64.zip". This seems to not set up the permissions necessary for the files to be accessed correctly by the service installer even when running in the "Run as administrator" privilege.
Now, if I go to my normal user account CMD shell and unzip the .zip file, and then go back to the administrator CMD shell and run service install , it works.
In fact, if I make a copy of the apache-tomcat-7.0.57 directory using COPY /S/D, and then try to install from that directory, it also works when you do a service install as an administrator.
Hope this helps.
I've been trying in Netbeans to break into the client-side code for a project built with gwt-maven-plugin 2.7.0.
My dev environment: win7 64bits, java 7.0.60, netbeans 8.01
I build the bare-bones project with the gwt-maven-plugin artifact, do a maven clean install, then a gwt:debug, everything (devmode/jetty) starts up correctly (no visible error), I can break into the server-side code, but as far as the client-side breakpoints are concerned, it will only work if I use Eclipse + Google plugin...no luck with netbeans.
Any idea what is wrong ?
For your reference, please find below the output of my gwt:debug in Netbeans.
Thank you very much in advance for your feedback and your expertise.
Regards
kb
cd C:\DN\MyApp; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_60" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0.1\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0.1\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 gwt:debug\""
Scanning for projects...
------------------------------------------------------------------------
Building GWT Maven Archetype 1.0-SNAPSHOT
------------------------------------------------------------------------
>>> gwt-maven-plugin:2.7.0:debug (default-cli) # MyApp >>>
--- gwt-maven-plugin:2.7.0:generateAsync (default) # MyApp ---
--- maven-resources-plugin:2.5:resources (default-resources) # MyApp ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 2 resources
--- maven-compiler-plugin:2.3.2:compile (default-compile) # MyApp ---
Nothing to compile - all classes are up to date
<<< gwt-maven-plugin:2.7.0:debug (default-cli) # MyApp <<<
--- gwt-maven-plugin:2.7.0:debug (default-cli) # MyApp ---
starting debugger on port 8000 in suspend mode
create exploded Jetty webapp in C:\DN\MyApp\target\MyApp-1.0-SNAPSHOT
Listening for transport dt_socket at address: 8000
Super Dev Mode starting up
workDir: C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp
Loading Java files in com.mycompany.myapp.MyApp.
Module setup completed in 4879 ms
The code server is ready at http://127.0.0.1:9876/
GET /recompile/MyApp
Job com.mycompany.myapp.MyApp_1_0
starting job: com.mycompany.myapp.MyApp_1_0
binding: user.agent=safari
Compiling module com.mycompany.myapp.MyApp
Unification traversed 16789 fields and methods and 1580 types. 1548 are considered part of the current module and 1548 had all of their fields and methods traversed.
Compiling 1 permutation
Compiling permutation 0...
Linking per-type JS with 1532 new types.
prelink JS size = 2512880
prelink sourcemap = 2512880 bytes and 73220 lines
postlink JS size = 2384562
postlink sourcemap = 2384562 bytes and 69785 lines
Source Maps Enabled
Compile of permutations succeeded
Compilation succeeded -- 7.911s
Linking into C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp\com.mycompany.myapp.MyApp\compile-2\war\MyApp; Writing extras to C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp\com.mycompany.myapp.MyApp\compile-2\extras\MyApp
Link succeeded
Linking succeeded -- 0.824s
8.817s total -- Compile completed
GWT 2.7's DevMode defaults to using SuperDevMode (as you can see in your logs), rather than "classic DevMode" with the browser plugin.
With SuperDevMode you debug client-side code in your browser using source maps, or in your IDE by remote-debugging your browser (in Eclipse using SDBG for example).
To roll back to "classic DevMode", configure your gwt-maven-plugin with <superDevMode>false</superDevMode> or pass -Dgwt.superDevMode=false to Maven.
See http://mojo.codehaus.org/gwt-maven-plugin/debug-mojo.html#superDevMode
Problem: Recieve 'Could not connect' error when using Openshift to deploy .war for PHP/Java bridge
Below I describe every step I've taken to get to this error, thanks in advance.
Full error: (IP concealed)
"Fatal error: Uncaught Could not connect to the JEE server W.X.Y.Z:8080. Please start it. Or define('JAVA_HOSTS',9267); define('JAVA_SERVLET',false); before including 'Java.inc' and try again. Error message: Connection refused (111) thrown in /home/stevenw1/public_html/softwareProject/real/inc/Java.inc on line 989"
Players: "Java_Bridge.war" = my java .war file that php will use to call methods from
"W.X.Y.Z" = Unchanging IP address of deployed .war file
"GUIProfile" = a Java class with #WebServlet("/GUIProfile") as public class GUIProfile extends HttpServlet
"tomcattest.php" = test file that calls GUIProfile's static method 'validate'
Deployed Java_Bridge.war and tomcattest.php work fine on my local tomcat, just not yet on Openshift.
Senario:
0. followed command line steps from Openshift 2012 java tomcat application
1. Using Openshift's rhc I have created my first app using "rhc app create -a tomcat6 -t jbossews-1.0"
2. cd ~/tomcat6/; git rm -rf ./src/ pom.xml
3. cp ~/Java_Bridge.war ./webapps/; git add ./webapps/Java_Bridge.war; git commit -m "first try"; git push
//notable output includes:
remote: Stopping jbossews cartridge
remote: Sending SIGTERM to jboss:386662 ...
remote: Skipping Maven build due to absence of pom.xml
remote: Preparing build for deployment
remote: Deployment id is bd83d6eb
remote: Activating deployment
remote: + '[' Java_Bridge.war ']'
remote: Starting jbossews cartridge
remote: Found W.X.Y.Z:8080 listening port //(not actual IP)
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
to ssh://thisisnottheactualuser#tomcat6-notthenamehereeither.rhcloud.com
4. Thinking the .war was deployed I ran a tomcattest.php that calls a java method 'validate', from java class GUIProfile that extends httpservlet, using the php/java bridge Java.inc
//of course using the same IP from above...
cat tomcattest.php;
<?php
define("JAVA_HOSTS", "W.X.Y.Z:8080");
define("JAVA_SERVLET", "/Java_Bridge/GUIProfile");
require_once("Java.inc");
$valiationOutput = java_context()->getServlet()->validate("hello");
echo $valiationOutput;
?>
EDIT: later tried this also in all instances: same results exactly
cat alternatetest.php
<?php
define("JAVA_HOSTS", "W.X.Y.Z:8080");
require_once("Java.inc");
echo java("java.lang.System")->getProperties();
?>
The output of calling tomcattest.php is the 'Fatal error' you see at the top.
Double Check:
5. ssh thisisnottheactualuser#tomcat6-notthenamehereeither.rhcloud.com
6. env | grep "IP"
OPENSHIFT_JBOSSEWS_IP=W.X.Y.Z
7. env | grep "PORT"
OPENSHIFT_JBOSSEWS_HTTP_PORT=8080
OPENSHIFT_JBOSSEWS_JPDA_PORT=8787
8. changed port in tomcattest.php to 8787, didn't change a thing of course.
9. restarted from the top, this time keeping ./src/ & pom.xml, same 'Deployment completed with status: success', same error using tomcattest.php with new listening IP...
10. tried solution from 'openshift youtube vid 2012' seemingly outdated. Followed step by step:
onced ssh'ed, no "tomcat" dir, I used cd $OPENSHIFT_DATA_DIR instead to access data dir
wget tomcat, changed ports to >15000, sh startup.sh && tail -f ../logs/*
notable errors in the result include:
SEVERE: Failed to initialize connector [Connector[AJP/1.3-15009]]
org.apache.catalina.LifecycleException: Failed to initialize component
[Connector[AJP/1.3-15009]] SEVERE: Failed to initialize connector
[Connector[AJP/1.3-15009]] org.apache.catalina.LifecycleException:
Failed to initialize component [Connector[AJP/1.3-15009]] SEVERE:
Failed to initialize end point associated with ProtocolHandler
["ajp-bio-15009"] java.net.BindException: Permission denied
:15009 SEVERE: Failed to initialize end point associated with
ProtocolHandler ["ajp-bio-15009"] java.net.BindException: Permission
denied :15009
11. restarted step 6, this time left IP's as they were, changing only localhost to tomcat-stevenwernercs.rhcloud.com, same result but with original IP's
12. ran out of options online, then I posed this question...
13. then I edited it a lot...
14. patiently wait :)
That is everything I have done, I am not sure why php isnt finding Java.
I looked at previous questions didn't find anything helpful.
Open to anything, thank you
Gears in a non-scable application are not allowed to communicate on any non http/ws port. So if your php java bridge is trying to communicate with the tomcat instance on 15009 (from what i see above) that is not going to work. You could only make requests on 80/443/8000/8443. Can you verify what port the java bridge works over?
Alternate solution: https://bitnami.com/cloud
I got it working using Bitnami with Amazon AWS, it provides free service for 1 year, documentation that is easy to follow, and plentiful and up to date, It took less than an hour.
Disclaimer: Using ssh tunnel for port 8080 i configured tomcat as if on localhost, and moved my hosted .php to the
same microserver that also hosted the tomcat. (I gave up on trying to host php and tomcat separately.)
I have hosted tomcat separately before on my university's tomcat server. But that was a node I had full access to.
I would still like to try Openshifts free solution, although the current resources and methods I've seen seem to no longer be valid. And unfortunately the workarounds are not intuitive enough and are currently over my head. Thank you.
I am trying to deploy my webservice on tomee server.
When I use maven goal as "tomme:run" to start the server, it gives the following error:
[INFO] Running 'run'. Configured TomEE in plugin is localhost:8080 (plugin shutdown port is 8005)
EError opening zip file or JAR rror occurred during initialization of VM
agent library failed to init: instrument
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
manifest missing : C:\Documents
[INFO] Total time: 30.844s
[INFO] Finished at: Thu Nov 01 17:36:15 IST 2012
[INFO] Final Memory: 10M/26M
[INFO] ------------------------------------------------------------------------
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.<init>(Socket.java:372)
at java.net.Socket.<init>(Socket.java:186)
at org.apache.openejb.config.RemoteServer.stop(RemoteServer.java:366)
at org.apache.openejb.maven.plugin.AbstractTomEEMojo$2.run(AbstractTomEEMojo.java:568)
But if I use startup.bat file to start the server , everything works fine.
Does anybody has any idea for this issue?
This seems a bit old but just in case if it helps.
It seems that when you are using the tomee plugin failed to start the server at the first place, and that is the reason for the connection refused issue. Because it tries to connect to the shutdown port to shutdown the server but obviously it is not available as the server never started.
So you should focus on "Error opening zip file or JAR rror occurred during initialization of VM agent library failed to init: instrument". By any chance, the artifact in your local maven repo can be corrupt ?
Best Regards,
Nandana
Not precisely the same situation, but I encountered this error:
"Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : C:apache-tomee-plus-1.5.2/lib/openejb-javaagent.jar
when I tried to fire up TomEE as "./catalina.sh start" in a Cygwin terminal on my Windows box. Same result whether I tried a new complete TomEE or an already-existing Tomcat with the TomEE war. Works fine when I use the batch file in a Windows terminal as "catalina start". I don't really care enough to chase the issue further, but it appears that Tommy likes you to use a native shell.